-
Notifications
You must be signed in to change notification settings - Fork 26
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 #71
Comments
That's a good idea to resolve any numpy conflicts. In this particular case, it would be worth considering replacement of the hand-crafted S-G filtering with the more feature-rich scipy version. (I suspect it was added manually because the S-G filter didn't exist in scipy when pywifes was first written.) |
We have a similar issue with |
I also had to set scipy >= 1.9.1 and photutils>=1.8.0 to get it to build properly on debian:12. I'll try and reproduce the error I get - essentially just build requirements for scipy conflicting with other things. |
`Collecting scipy==1.9.1 × Getting requirements to build wheel did not run successfully.
note: This error originates from a subprocess, and is likely not a problem with pip. |
Anyhow, adding continuous testing / integration will help sort out these packaging problems (for different dependencies and different versions of Python) |
Yeah, in the last version (the one we deliver) we have in the setup.py:
I'm now added the condition in numpy <2 |
Right, specifically I need to have >= for scipy (and probably photutils). The equality alone was not sufficient. |
I ran a pip install today of the pipeline and it grabbed numpy 2.0 as part of the requirements for the installation as listed in setup.py.
Trying to run the pipeline resulted in the following exception being raised:
File "/home/dcadmin/.local/lib/python3.11/site-packages/pywifes/wifes_calib.py", line 571, in derive_wifes_calibration
temp_fvals = savitzky_golay(temp_full_y,101,1,0)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/dcadmin/.local/lib/python3.11/site-packages/pywifes/wifes_calib.py", line 394, in savitzky_golay
b = numpy.mat([[k**i for i in order_range] for k in range(-half_window, half_window+1)])
^^^^^^^^^
File "/usr/local/lib/python3.11/dist-packages/numpy/init.py", line 397, in getattr
raise AttributeError(
AttributeError:
np.mat
was removed in the NumPy 2.0 release. Usenp.asmatrix
instead.There may be other incompatible functions than the example given above, but I haven't tried to take this any further to find them.
It would be a good idea to update the numpy functions to be 2.0 compatible.
Otherwise a temporary fix could be specifying in setup.py:
"numpy < 2.0",
The text was updated successfully, but these errors were encountered: