-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: np.lexsort MemoryError on empty array with non-standard strides #14228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The problem is that in the numpy/numpy/core/src/multiarray/item_selection.c Line 1519 in ea965e4
No error code at the point when it fails, in which case the function assumes that the cause is memory exhaustion: numpy/numpy/core/src/multiarray/item_selection.c Line 1621 in ea965e4
The fix is probably to ensure that |
Thanks for tracking this down. Is this a regression from previous versions? Would you like to make a pull request? Please add a failing test to |
BUG: don't fail when lexsorting some empty arrays (#14228)
Numpy 1.17.0 raises MemoryError when using
lexsort
on an empty array with non-standardstrides
. Ifstrides
is the natural one, or if there is >= 1 element in the input, then it works as expected.Reproducing code example:
Numpy/Python version information:
1.17.0 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)]
The text was updated successfully, but these errors were encountered: