Fixes for NumPy 2.0 compatiblity - #422
Conversation
|
Hi @WilliamJamieson |
|
Since NumPy 2.0 is still in development you probably do not want to cache it because you will need to pull the nightly wheel. |
| - python-version: 3.9 | ||
| numpy-version: "2.0.dev" | ||
| - python-version: 3.10 | ||
| numpy-version: "2.0.dev" | ||
| - python-version: 3.11 | ||
| numpy-version: "2.0.dev" |
There was a problem hiding this comment.
Per NEP 29, NumPy is only supported on Python 3.9+.
|
LGTM! |
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## dev #422 +/- ##
==========================================
+ Coverage 98.60% 98.63% +0.03%
==========================================
Files 14 14
Lines 3299 3299
==========================================
+ Hits 3253 3254 +1
+ Misses 46 45 -1
|
NumPy 2.0 has removed a couple of type aliases referenced by
deepdiffas part of NEP 52 in numpy/numpy#24376. Namely,np.float_, which is an alias ofnp.doubleaccording to the NumPy docs.np.complex_, which is an alias ofnp.cdoubleaccording to the NumPy docs.These are blocking my ability to test code using NumPy 2.0 (see spacetelescope/romancal#886).
When I ran the test suite with NumPy 2.0 installed there was one additional deprecation of
np.in1din favor ornp.isin.In any case, the
deepdifftests pass locally for me if I install the published dev wheel of NumPy via:pip install --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple "numpy>=0.0.dev0to override the current
requirements-dev.txtpin for NumPy. I have not touched the GitHub CI fordeepdiffin order to run NumPy 2.0 tests at this time, please let me know if/how you would like me to do this if you would like that added.