brey / pyPoseidon

Framework for hydrodynamic simulations of geoflows
https://pyposeidon.readthedocs.io/
European Union Public License 1.2
7 stars 8 forks source link

Deprecations warnings with numpy 1.20+ #32

Closed pmav99 closed 3 years ago

pmav99 commented 3 years ago

With numpy 1.20+, the following lines throw warnings similar to these:

DeprecationWarning: `np.str` is a deprecated alias for the builtin `str`. To silence this warning, use `str` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.str_` here.
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/schism.py:605
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/schism.py:187
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/schism.py:593
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/schism.py:599
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/d3d.py:509
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/d3d.py:778
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/d3d.py:784
/home/runner/work/pyPoseidon/pyPoseidon/pyPoseidon/d3d.py:790

https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations

pmav99 commented 3 years ago

This mostly got addressed in 3da5268

Nevertheless, this line also needs fixing https://github.com/brey/pyPoseidon/blob/4ab9963dc1f2f5c59a07cba0e948c7560ebd24f8/pyPoseidon/schism.py#L599