I am using the latest version of UgridPy. I have noticed that in line 517 of the ugrid.py file, the data type is defined as (dtype=np.int). However, this aliases was originally deprecated in NumPy 1.20. Thus, it is challenging to use this package with other packages depending on newer versions of Numpy.
Can you modify this line from (dtype=np.int) to (dtype=int), i.e., upgrade Numpy version, to make this package compatible with others?
AttributeError: module 'numpy' has no attribute 'int'.
np.int was a deprecated alias for the builtin int. To avoid this error in existing code, use int by itself. Doing this will not modify any behavior and is safe. When replacing np.int, you may wish to use e.g. np.int64 or np.int32 to specify the precision. If you wish to review your current use, check the release note link for additional information.
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 am using the latest version of UgridPy. I have noticed that in line 517 of the ugrid.py file, the data type is defined as (dtype=np.int). However, this aliases was originally deprecated in NumPy 1.20. Thus, it is challenging to use this package with other packages depending on newer versions of Numpy.
Can you modify this line from (dtype=np.int) to (dtype=int), i.e., upgrade Numpy version, to make this package compatible with others?
File [c:\ ......\site-packages\ugrid\ugrid.py:517] [514] if num_faces > 0: [515] num_face_nodes_max = np.max(mesh2d.nodes_per_face) [516] face_nodes_array = np.full( --> [517] num_faces * num_face_nodes_max, dtype=np.int, fill_value=-1 [518] ) ...
AttributeError: module 'numpy' has no attribute 'int'.
np.int
was a deprecated alias for the builtinint
. To avoid this error in existing code, useint
by itself. Doing this will not modify any behavior and is safe. When replacingnp.int
, you may wish to use e.g.np.int64
ornp.int32
to specify the precision. If you wish to review your current use, check the release note link for additional information. 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