pyMannKendall
pyMannKendall copied to clipboard
Deprecated use of np.float in __preprocessing function.
Hi! I recently ran into an issue trying to use the original_test function on some time series data. Here is the error message:
in __preprocessing(x) 18 def __preprocessing(x): ---> 19 x = np.asarray(x).astype(np.float) 20 dim = x.ndim 22 if dim == 1: ...
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'm not sure if other people are having the same issue? I could change my numpy version, but this seems like a non-ideal fix to the issue. My current numpy version is 1.24.3. Thank you!