-
Notifications
You must be signed in to change notification settings - Fork 41
Address DeprecationWarnings and suppress warnings for numpy 1.25+ #426
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
Conversation
|
There are four (4) tests currently failing that imply changes in values: In some cases, I believe the issue is a false positive: and in others there are some actual precision changes: I'm not certain if these values are insignificant enough to be ignored. Update: It's entirely possible that the differences may be due to the encoding of the array, in which case leveraging the Update: I think the issue may have to do with deeper inspection provided by newer |
|
I noticed that the GitHub workflows weren't testing the proper Python versions (i.e. Python was being updated after being set within the workflows: 3.9/3.10/3.11 → 3.13). This has now also been fixed. |
|
@raybellwaves @aaronspring @bradyrx This Pull Request is ready for review! Thanks! |
Description
This Pull Request addresses several previous
DeprecationWarningsthat are fully deprecated in more modern version ofnumpyandscikit-learn. It also suppresses several warnings raised bynumpyduring the testing suite. This adds a pin onnumpy(v1.25+) andnumba(v0.57+).I've also removed the
suppress_warnings()function, as the number of possibleRuntimeWarningswas beyond reasonable, especially when comparing older and newer scientific Python libraries (different categorizations were possible). Thewarnings.filter(RuntimeWarning)approach is more powerful.It also simplifies the
completeinstallation recipe by reusing thexskillscore[test]recipe.Addresses problems identified in pangeo-data/climpred#870
Changes here supersede existing Pull Requests:
Type of change
Please delete options that are not relevant.
suppress_warnings()was removed (not part of the User API).How Has This Been Tested?
This has been tested locally using
pytestand Python 3.11. GitHub Workflows have been slightly modified (and will continue to be modified in subsequent commits).Checklist (while developing)
Pre-Merge Checklist (final steps)
Discussion
This Pull Request is required in order to support downstream libraries that rely on newer Python versions (Python 3.12/3.13) and modern scientific Python libraries (
numpy,scipy,scikit-learn,xarray, etc.).