//numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'? #4

Open
opened 2025-05-05 16:40:10 +02:00 by asia · 0 comments
Member

Probably due to NumPy version being a bit higher than suggested, however, downgrading NumPy might be difficult due to other dependencies.
Stack trace:

File "/net/pr2/projects/plgrid/plggeposapps/pythonenvs/sha-env/lib/python3.11/site-packages/adaptivekde/ssvkernel.py", line 99, in ssvkernel
N = sum(y_hist * dt).astype(np.float)
^^^^^^^^
File "/net/pr2/projects/plgrid/plggeposapps/pythonenvs/sha-env/lib/python3.11/site-packages/numpy/init.py", line 324, in getattr
raise AttributeError(former_attrs[attr])
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.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'?

Run without PDF and m files.

Probably due to NumPy version being a bit higher than suggested, however, downgrading NumPy might be difficult due to other dependencies. Stack trace: > File "/net/pr2/projects/plgrid/plggeposapps/pythonenvs/sha-env/lib/python3.11/site-packages/adaptivekde/ssvkernel.py", line 99, in ssvkernel > N = sum(y_hist * dt).astype(np.float) > ^^^^^^^^ > File "/net/pr2/projects/plgrid/plggeposapps/pythonenvs/sha-env/lib/python3.11/site-packages/numpy/__init__.py", line 324, in __getattr__ > raise AttributeError(__former_attrs__[attr]) > 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. > The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at: > https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations. Did you mean: 'cfloat'? Run without PDF and m files.
ftong was assigned by asia 2025-05-05 17:07:46 +02:00
Login to join this conversation.
No Label
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: official-apps/SeismicHazardForecasting#4
No description provided.