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
BUG: PyArray_{Get,Set}Map counter types are "int", should be "npy_intp" #188
Conversation
Should be using npy_intp rather than int.
I messed up the test case, and I realized it would fail due to MemoryError on most machines anyway, so I've pushed overtop of the pull request with just the bugfix commit. Nevertheless, before:
And after:
|
Hmm, I've been thinking about it, and I suppose I could pair down the size of the arrays a bit, put all of this inside a try, catch the MemoryError and raise a SkipTest I'm that case. What do people think of that? It seems like a bad idea to have a test case that potentially allocates several gigabytes in a project like NumPy, but it might be worth it... |
There's another low precision counter in PyArray_SetMap at https://github.com/dwf/numpy/blob/178bd8b4a668328f27886f218be0e337c21952ba/numpy/core/src/multiarray/mapping.c#L358 |
Thanks to Christoph Gohlke for pointing this out.
Thanks, fixed that one too. |
This is great. Thanks! |
BUG: PyArray_{Get,Set}Map counter types are "int", should be "npy_intp"
Hi Travis, This one could probably have been merged fast forward. You can check what things look like with
|
It's unfortunate that the "merge" button on the web interface always produces a merge commit. |
Should be using npy_intp rather than int.
By the way (to anyone who might show up here via Google or something) I ascertained from the version history that this bug fix did indeed make it into 1.6.2, even though it's not in the release notes. cc/@rgommers |
Sorry about that. Looks like for core I only listed the commits that fixed actual tickets, to keep the listing to a reasonable size. Probably should list all PRs too next time. |
N/p, not criticizing, just thought you should know. Thanks for all your hard work putting together the releases. |
Leads to premature end to loop when working with gigantic arrays.