-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
ENH: allow ndimage to interpolate intp arrays #64
Conversation
Add tests of use of input datatypes in ndimage interpolation C routines.
The maxes were set to MAX_UINT32 and labeled 'fixme'; this was probably because of an error in the numpy includes for MAX_UINT64, leading to a compiler error. We just work round it by using a correctly defined version.
The test given in the first patch does not fail for me on the current version of ndimage. Int64 and intp should be the same data types, so I don't think we need to handle them separately? The second patch looks good, but let's add a test to verify its behaviour. |
Here's a test for your second patch: |
On Sun, Aug 28, 2011 at 2:28 AM, stefanv
It won't fail on 64 bits I guess. I was working on 32 bits. 32 bits OSX: In [2]: np.dtype(np.intp).num In [3]: np.dtype(np.int32).num In [7]: np.dtype(np.int64).num 64 bits Linux: In [2]: np.dtype(np.intp).num In [3]: np.dtype(np.int32).num In [4]: np.dtype(np.int64).num So it looks like, on 64 bits, the intp type is the same by number as |
Thanks to Stefan van der Walt for the test idea.
Here's the test failure for scipy 0.9.0 on OSX 32 bits: test_datatypes.test_map_coordinates_dts ... ERROR ERROR: test_datatypes.test_map_coordinates_dtsTraceback (most recent call last): |
This change breaks compilation on 64-bit, where NPY_INT64 == NPY_INTP which causes duplicate case labels. I tried to fix it in 164c7c8 -- please test again. The different Numpy numeric types are defined in the enum I think there are opportunities for similar int vs. long fixes in the rest of ndimage -- along these lines: |
Sorry, tested on my changes and merged Matthew's. The #ifdefs I removed fixed the compilation. Will have to check if that is the correct solution or not. |
Ah, I see you fixed it. Thanks :) |
Thanks - works fine for me, thanks for the explanation. |
ENH: update PROPACK submodule commit hash
Add tests of use of input datatypes in ndimage interpolation C routines.