You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using a newer numpy with the latest mtpy, I get the following error:
File C:\Python\WPy64-31131\python-3.11.3.amd64\Lib\site-packages\mtpy\core\edi.py:276 in _read_mt
freq_arr = np.array(data_dict['freq'], dtype=np.float)
File C:\Python\WPy64-31131\python-3.11.3.amd64\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 also get a similar one for np.complext. In my case I was importing EDI data.
the solution just seems to be as simple as replacing np.float with float and np.complex with complex
mtpy == 1.1.5
numpy == 1.24.3
The text was updated successfully, but these errors were encountered:
When using a newer numpy with the latest mtpy, I get the following error:
File C:\Python\WPy64-31131\python-3.11.3.amd64\Lib\site-packages\mtpy\core\edi.py:276 in _read_mt
freq_arr = np.array(data_dict['freq'], dtype=np.float)
File C:\Python\WPy64-31131\python-3.11.3.amd64\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 builtinfloat
. To avoid this error in existing code, usefloat
by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, usenp.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 also get a similar one for np.complext. In my case I was importing EDI data.
the solution just seems to be as simple as replacing np.float with float and np.complex with complex
mtpy == 1.1.5
numpy == 1.24.3
The text was updated successfully, but these errors were encountered: