Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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

Merged
wpbonelli merged 1 commit into
modflowpy:developfrom
mwtoews:numpy-2.0-deps
Jun 17, 2024
Merged

refactor: fixes for numpy-2.0 deprecation warnings, require numpy>=1.20.3#2237
wpbonelli merged 1 commit into
modflowpy:developfrom
mwtoews:numpy-2.0-deps

Conversation

@mwtoews

@mwtoews mwtoews commented Jun 17, 2024

Copy link
Copy Markdown
Contributor

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.

@codecov

codecov Bot commented Jun 17, 2024

Copy link
Copy Markdown

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
@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