-
Notifications
You must be signed in to change notification settings - Fork 472
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
Avoid trapz DeprecationWarning on numpy 2 #1971
Conversation
I thought it was |
Apparently, yes, it was actually just that one and apparently you got that in #1954. This is what I get for starting this from an install of pint 0.24. I'll drop that commit and that will leave only avoiding the deprecation warning if we want. |
if you're fine with making this a general " The implementation itself forwards to |
trapz has been deprecated in favor of the newly available trapezoid function. This wraps the new function and avoids a DeprecationWarning on numpy>=2.
@keewis I'm ok with doing that, except that skipping the tests should probably go with adding Numpy 2 to the CI matrix, and I really have no clue how best to do that, unless it's a specific |
I believe you can add the release candidate to the build matrix: include:
# numpy>=2
- python-version: "3.12"
numpy: "numpy>=2.0.0rc1"
uncertainties: null (not sure, though) |
only 4 failures before this PR, so I'll merge this and finish it up in #1985 |
trapz has been deprecated in favor of the newly available trapezoid function. This wraps the new function and avoids a DeprecationWarning on numpy>=2.
I haven't exhaustively gone through the changes in numpy 2, but this is enough to allow MetPy's test suite to pass with no new warnings on numpy 2.
pre-commit run --all-files
with no errors