badlands-model / badlands

Basin and Landscape Dynamics model

Home Page:https://badlands.readthedocs.io

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Some updates may needed for numpy version >=1.24.0

NengLu opened this issue · comments

File "badlands/surface/raster2TIN.py", line 121, in _raster_edges
    dtype=numpy.float,
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.

np.float may need to be updated to np.float64 if the recent version numpy is imported, as numpy 1.24.0 removed these aliases (e.g. numpy.float) completely.

Yes, this is deprecated for np.float64 specifically for an example.

For those looking for a workaround, pip install numpy<1.24