Closed px39n closed 2 months ago
We want to support numpy 2.0. Unfortunately, that means we need to wait until zfpy has been updated. See https://github.com/zarr-developers/numcodecs/pull/535
Agreed
That said, do understand why this error is confusing
Perhaps we can add some logic here to check NumPy version and disable the extension with an appropriate message to the user
We could also ensure that the zfpy
optional dependency has this constraint
Thanks! 🙏
Please add a release note as well. Perhaps under fix?
Attention: Patch coverage is 83.33333%
with 2 lines
in your changes missing coverage. Please review.
Project coverage is 99.82%. Comparing base (
342754d
) to head (577ca5a
).
pre-commit.ci autofix
This looks like a great solution. Thank you!
@jakirkham Thank you for constructive suggestions, and thanks @normanrz for mention #535
It helps the numpy 2.0 users like me who would like to use zfpy but no clues where is going wrong with import error
It looks like this PR was merged without hitting the coverage target. Now all subsequent PRs to numcodecs are failing that test (see https://github.com/zarr-developers/numcodecs/pull/544#issuecomment-2215898925).
We should fix this.
Fixed in #546
Thanks all! 🙏
When
numpy >=2.0.0 from numcodecs.zfpy import ZFPY
raise error [ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject]
The error is caused by zfpy library crashing with recent ABI breaking of numpy udpate. So we'd better force numpy <2.0 unless zfpy update again.
Reference: (https://stackoverflow.com/questions/66060487/valueerror-numpy-ndarray-size-changed-may-indicate-binary-incompatibility-exp)
[Description of PR]
TODO: