-
Notifications
You must be signed in to change notification settings - Fork 74
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
Dependencies: Added support of numpy
v2
#4082
Conversation
647d3bf
to
268d43c
Compare
A few tests still fails with numpy v2:
|
Digging into those issues, leads to issue with |
The following issues are fixed by dd403ee:
|
Added changes to support: With this PR tests passes with numpy2, except:
|
Changes are grouped by commit, so it should be simpler to review commits than the whole PR... |
From what I tested, with this PR tests pass, except for https://github.com/silx-kit/silx/blob/main/src/silx/math/fft/test/test_fft.py which as mainy extra dependencies. So ready for review. What I haven't checked is the effect of changes to numpy data type promotion |
LGTM |
Thanks for the review! |
Checklist:
<Module or Topic>: <Action> <Summary>
(see contributing guidelines)This PR prepares silx for support of numpy v2 by:
np.rec
instead ofnp.core.recarray
cython
fixed-size types instead ofcimport numpy
: This leaves the constraint of usingnumpy
headers to build C extensions.ruff check --select NPY201
I've tested that cython extensions built with numpy v1 can be imported with numpy v2.
Full testing with numpy v2 is still needed.
I also raised the minimum supported version of numpy to the "oldest-supported-numpy" one on Python3.7.
Closes #4080