Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: module 'numpy' has no attribute 'float' when importing #29

Closed
patoorio opened this issue Aug 3, 2023 · 0 comments
Closed

Comments

@patoorio
Copy link

patoorio commented Aug 3, 2023

Hi,

I am having the following error when importing datasets:

(...)

File C:\ProgramData\Miniconda3\lib\site-packages\enigmatoolbox\mesh\mesh_elements.py:623
    dtype=np.float):

  File C:\ProgramData\Miniconda3\lib\site-packages\numpy\__init__.py:305 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

I guess the fix is as easy as change 'np.float' to 'float' in mesh_elements.py:623, but not sure

Katterrina pushed a commit to Katterrina/ENIGMA that referenced this issue Feb 6, 2024
deprecated numpy types changed to Python types
(https://numpy.org/devdocs/release/1.20.0-notes.html)
Katterrina pushed a commit to Katterrina/ENIGMA that referenced this issue Feb 6, 2024
deprecated numpy types changed to Python types
(https://numpy.org/devdocs/release/1.20.0-notes.html)
saratheriver added a commit that referenced this issue Apr 8, 2024
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

No branches or pull requests

2 participants