-
Notifications
You must be signed in to change notification settings - Fork 25
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
NumPy 2.0 support #100
Comments
It looks like this may be the case based on lines like this imagecodecs/imagecodecs/_shared.pyx Line 44 in 2ddadaf
|
I am aware of the numpy 2 transition. The development version of imagecodecs already passes all tests possible. For CI to succeed, some test dependencies such as numcodecs and blosc 1 need numpy 2 compatible releases. The next imagecodecs release is also waiting for updates of some dependencies: liblzma, Little-CMS... |
Thanks Christoph! 🙏 Ok that's good to know Took a look at Numcodecs in issue ( zarr-developers/numcodecs#521 ). It only uses NumPy's Python API (and a very limited set at that), which was unaffected by the new version. Also ran tests locally for good measure. So think it should already work (though please let us know if you see issues) With Blosc 1, it appears to only use NumPy for testing. Searching the Blosc 1 code more generally, it has some benchmarks and docs that use NumPy, but nothing else AFAICT. Is there somewhere else where NumPy comes up in Blosc 1? Regarding the other dependencies, do these use NumPy as well (IOW are these Python wrappers of libraries) or are these just the C/C++ libraries? |
You are right. Blosc 1 does not link to numpy (it was blosc2, which now has a numpy compatible release), neither does numcodecs (it was zfpy that failed, which is optional). Looks like imagecodecs should be good to build and test on CI then. I'll try on the weekend. |
Ah ok. Good to know about Blosc 2 Also good catch with Numcodecs' optional zfpy. Appears to be tracked in upstream issue: LLNL/zfp#210 |
Fixed in v2024.6.1. |
NumPy 2.0 is coming out soon ( numpy/numpy#24300 ). NumPy 2.0.0rc1 packages for conda & wheels came out 3 weeks back ( numpy/numpy#24300 (comment) )
To prepare for NumPy 2.0, it might be worthwhile to start testing against NumPy 2 in CI
NumPy has put out a migration guide. More details are in the release notes
If imagecodecs make use of NumPy's C API (and produces wheels that use it), having a release of imagecodecs with wheels built against NumPy 2.0.0rc1 would be helpful to ensure NumPy 1 & 2 compatible wheels (as wheels built against NumPy 1 won't be compatible with NumPy 2). More details in this NumPy 2 ABI doc
Also as NumPy is tracking ecosystem support for NumPy 2.0, it would be helpful to share imagecodecs current support status in issue (with any plans): numpy/numpy#26191
The text was updated successfully, but these errors were encountered: