modflowpy / flopy

A Python package to create, run, and post-process MODFLOW-based models.
https://flopy.readthedocs.io
Other
506 stars 306 forks source link

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

Closed mwtoews closed 2 months ago

mwtoews commented 2 months ago

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

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[bot] commented 2 months ago

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 ```diff @@ 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](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy) | Coverage Δ | | |---|---|---| | [flopy/modflow/mfsfr2.py](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?src=pr&el=tree&filepath=flopy%2Fmodflow%2Fmfsfr2.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy#diff-ZmxvcHkvbW9kZmxvdy9tZnNmcjIucHk=) | `86.7% <100.0%> (-0.7%)` | :arrow_down: | | [flopy/plot/plotutil.py](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?src=pr&el=tree&filepath=flopy%2Fplot%2Fplotutil.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy#diff-ZmxvcHkvcGxvdC9wbG90dXRpbC5weQ==) | `55.7% <100.0%> (-0.4%)` | :arrow_down: | | [flopy/utils/binaryfile.py](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?src=pr&el=tree&filepath=flopy%2Futils%2Fbinaryfile.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy#diff-ZmxvcHkvdXRpbHMvYmluYXJ5ZmlsZS5weQ==) | `81.9% <100.0%> (+0.4%)` | :arrow_up: | | [flopy/utils/datafile.py](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?src=pr&el=tree&filepath=flopy%2Futils%2Fdatafile.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy#diff-ZmxvcHkvdXRpbHMvZGF0YWZpbGUucHk=) | `74.7% <ø> (+1.4%)` | :arrow_up: | | [flopy/utils/modpathfile.py](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?src=pr&el=tree&filepath=flopy%2Futils%2Fmodpathfile.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy#diff-ZmxvcHkvdXRpbHMvbW9kcGF0aGZpbGUucHk=) | `87.9% <100.0%> (-0.6%)` | :arrow_down: | | [flopy/utils/recarray\_utils.py](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?src=pr&el=tree&filepath=flopy%2Futils%2Frecarray_utils.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy#diff-ZmxvcHkvdXRpbHMvcmVjYXJyYXlfdXRpbHMucHk=) | `94.4% <ø> (ø)` | | | [flopy/utils/util\_list.py](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?src=pr&el=tree&filepath=flopy%2Futils%2Futil_list.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy#diff-ZmxvcHkvdXRpbHMvdXRpbF9saXN0LnB5) | `75.1% <100.0%> (-0.4%)` | :arrow_down: | | [flopy/modflow/mfgage.py](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?src=pr&el=tree&filepath=flopy%2Fmodflow%2Fmfgage.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy#diff-ZmxvcHkvbW9kZmxvdy9tZmdhZ2UucHk=) | `89.0% <0.0%> (ø)` | | | [flopy/utils/zonbud.py](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?src=pr&el=tree&filepath=flopy%2Futils%2Fzonbud.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy#diff-ZmxvcHkvdXRpbHMvem9uYnVkLnB5) | `67.0% <88.8%> (+0.1%)` | :arrow_up: | | [flopy/modflow/mffhb.py](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?src=pr&el=tree&filepath=flopy%2Fmodflow%2Fmffhb.py&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy#diff-ZmxvcHkvbW9kZmxvdy9tZmZoYi5weQ==) | `63.2% <0.0%> (-0.2%)` | :arrow_down: | | ... and [1 more](https://app.codecov.io/gh/modflowpy/flopy/pull/2237?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy) | | ... and [84 files with indirect coverage changes](https://app.codecov.io/gh/modflowpy/flopy/pull/2237/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=modflowpy)