romanzes637 / gmsh_scripts

Mixed (structured/unstructured) 3D mesh generator based on curved cuboid elements (primitives)
Other
18 stars 7 forks source link

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

Closed vincent-skywalker closed 1 year ago

vincent-skywalker commented 1 year ago

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 commented 1 year ago

Fixed