Skip to content
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

Open
jakirkham opened this issue Apr 24, 2024 · 5 comments
Open

NumPy 2.0 support #100

jakirkham opened this issue Apr 24, 2024 · 5 comments

Comments

@jakirkham
Copy link

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

@jakirkham
Copy link
Author

If imagecodecs make use of NumPy's C API...

It looks like this may be the case based on lines like this

cimport numpy

@cgohlke
Copy link
Owner

cgohlke commented Apr 25, 2024

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...

@jakirkham
Copy link
Author

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?

@cgohlke
Copy link
Owner

cgohlke commented Apr 25, 2024

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.

@jakirkham
Copy link
Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants