-
Notifications
You must be signed in to change notification settings - Fork 52
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
Updating to Polynomial #206
Conversation
I like the modernization idea, but the wholesale changes to the new Could we just switch to |
Sounds good, I've submitted PR #207 to address the short-term issues, but will continue testing against this PR and keep this updated. |
22562ea
to
04d86b8
Compare
32a973c
to
0d5c454
Compare
0948b71
to
81cd40e
Compare
81cd40e
to
1df0712
Compare
5218e28
to
2a59a01
Compare
This PR now passes all CI checks and has been tested on real data to ensure it gives the same results. |
6434e23
to
6a8027b
Compare
6a8027b
to
74ee07f
Compare
Thanks for keeping an eye on this. Can you update minimum versions on the |
This is a good point, we actually maintain greater compatibility with this change. The "new" Polynomial syntax has been around in NumPy since 1.4, which is over 10 years old at this point. It's true that scipy has finally removed the deprecated "simps/cumtrapz" syntax, I've forked peakutils and made the necessary updates, I wonder if we can pull from there for now. I wonder if there is a more modern package with the same functionality. |
Updated setup.cfg to make NumPy requirement explicit for Polynomial Package.
I've just pushed the change requiring NumPy >=1.4. There are likely other parts of grizli that would require newer NumPy versions, but this is a start. |
Thanks. Can you find the minimum scipy needed for cumulative_trapezoid? |
Specifically for compatibility with scipy.integrate functions.
Scipy 1.6 introduced the new scipy.integrate. |
Merged! Thanks again, @TheSkyentist. |
As of SciPy 1.12.0
polyfit
andpolyval
can no longer be directly imported from SciPy. This caused import errors when running grizli. I suspect this is due to the fact thatpolyfit
andpolyval
are part of the old polynomial API, which has been upgraded with NumPy Polynomial package, primarily resulting in greater numerical stability. While I could have just fixed the imports, I went through and updated the code to use the new Polynomial API. If preferred, I can simply replace the scipy imports with the correct/not broken numpy imports.