Skip to content
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

refactor: fixes for numpy-2.0 deprecation warnings, require numpy>=1.20.3 #2237

Merged
merged 1 commit into from
Jun 17, 2024

Conversation

mwtoews
Copy link
Contributor

@mwtoews mwtoews commented Jun 17, 2024

This PR resolves several deprecation warnings from NumPy 2.0 (xref #2153):

  • np.in1d()np.isin()
  • "a16" → "S16" to describe 16-length string of bytes
  • The numpy.core.records module is private, so use numpy.rec instead, which seems to work with older versions

This also bumps the minimum version of numpy from 1.15.0 to 1.20.3, since this is the minimum for pandas 2.0.0, thus the minimum versions were incompatible.

Copy link

codecov bot commented Jun 17, 2024

Codecov Report

Attention: Patch coverage is 75.00000% with 6 lines in your changes missing coverage. Please review.

Project coverage is 66.7%. Comparing base (e2a85a3) to head (3ec1915).
Report is 4 commits behind head on develop.

Additional details and impacted files
@@            Coverage Diff            @@
##           develop   #2237     +/-   ##
=========================================
- Coverage     70.8%   66.7%   -4.1%     
=========================================
  Files          294     294             
  Lines        59026   58888    -138     
=========================================
- Hits         41832   39331   -2501     
- Misses       17194   19557   +2363     
Files Coverage Δ
flopy/modflow/mfsfr2.py 86.7% <100.0%> (-0.7%) ⬇️
flopy/plot/plotutil.py 55.7% <100.0%> (-0.4%) ⬇️
flopy/utils/binaryfile.py 81.9% <100.0%> (+0.4%) ⬆️
flopy/utils/datafile.py 74.7% <ø> (+1.4%) ⬆️
flopy/utils/modpathfile.py 87.9% <100.0%> (-0.6%) ⬇️
flopy/utils/recarray_utils.py 94.4% <ø> (ø)
flopy/utils/util_list.py 75.1% <100.0%> (-0.4%) ⬇️
flopy/modflow/mfgage.py 89.0% <0.0%> (ø)
flopy/utils/zonbud.py 67.0% <88.8%> (+0.1%) ⬆️
flopy/modflow/mffhb.py 63.2% <0.0%> (-0.2%) ⬇️
... and 1 more

... and 84 files with indirect coverage changes

@wpbonelli wpbonelli merged commit 1e44b3f into modflowpy:develop Jun 17, 2024
24 checks passed
@mwtoews mwtoews deleted the numpy-2.0-deps branch June 17, 2024 17:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants