You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a row ends in a delimiter, `add_fields` can be called twice without
any field actually being parsed. This causes issues with the field
buffer setup.
Basically, I tried to be too smart, and now it needs a small fixup...
closesnumpygh-22833
…22836)
If a row ends in a delimiter, `add_fields` can be called twice without
any field actually being parsed. This causes issues with the field
buffer setup.
closesgh-22833
Thanks for the report @horsti371! Sorry about that bug, will be fixed in the 1.24.1 release. In case it helps (a bit): it can only be hit if the line ends with a delimiter.
charris
pushed a commit
to charris/numpy
that referenced
this issue
Dec 21, 2022
…umpy#22836)
If a row ends in a delimiter, `add_fields` can be called twice without
any field actually being parsed. This causes issues with the field
buffer setup.
closesnumpygh-22833
Describe the issue:
Loading data using numpy.loadtxt crashes in some specific cases. E.g., loading a string like
"1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 11111 11111 11111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 111 111 111 111 111 111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 1111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 11111 1 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11 11111 11 11 11111 11 11 11 11 11 22 33 11 "
fails on Windows and Ubuntu. This seems to depend on the length of the string and the trailing whitespace. When changing the end of the text above to
"... 22 33 1 "
or
"... 22 33 11"
or
"... 22 33 111"
or
"... 22 33 111 "
loading succeeds.
This happens for NumPy 1.23.0 and 1.24.0 but not for NumPy 1.22.0
Reproduce the code example:
Error message:
NumPy/Python version information:
Ubuntu:
1.24.0 3.10.6 (main, Nov 14 2022, 16:10:14) [GCC 11.3.0]
Windows:
1.23.0 3.9.7 (tags/v3.9.7:1016ef3, Aug 30 2021, 20:19:38) [MSC v.1929 64 bit (AMD64)]
Context for the issue:
Can't load arbitrary text-based vectors.
The text was updated successfully, but these errors were encountered: