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

Error: np.float was a deprecated alias for the builtin float #29

Closed
vincent-skywalker opened this issue Sep 23, 2023 · 1 comment
Closed
Assignees
Labels

Comments

@vincent-skywalker
Copy link

vincent-skywalker commented Sep 23, 2023

I got this error when running python -m gmsh_scripts matrix.json. The python version is 3.11.5

  File "C:\Users\*\anaconda3\envs\*\Lib\site-packages\gmsh_scripts\entity\point.py", line 58, in parse_coordinates
    coordinates = np.array(coordinates, dtype=np.float)
                                              ^^^^^^^^
  File "C:\Users\*\anaconda3\envs\*\Lib\site-packages\numpy\__init__.py", line 338, 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'?
@romanzes637
Copy link
Owner

Fixed

@romanzes637 romanzes637 self-assigned this Oct 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants