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
{{ message }}
This repository has been archived by the owner on Jul 30, 2024. It is now read-only.
@xir4n, any plan to update the library to support numpy v2.
It seems like dtcwt/numpy/transform1d.py uses asfarray which has been removed - see below
File "/home/docs/checkouts/readthedocs.org/user_builds/pylops/envs/586/lib/python3.9/site-packages/dtcwt/numpy/transform1d.py", line 51, in forward
X = asfarray(X)
File "/home/docs/checkouts/readthedocs.org/user_builds/pylops/envs/586/lib/python3.9/site-packages/dtcwt/utils.py", line 105, in asfarray
return np.asfarray(X, dtype=X.dtype)
File "/home/docs/checkouts/readthedocs.org/user_builds/pylops/envs/586/lib/python3.9/site-packages/numpy/init.py", line 397, in getattr
raise AttributeError(
AttributeError: np.asfarray was removed in the NumPy 2.0 release. Use np.asarray with a proper dtype instead.
The text was updated successfully, but these errors were encountered:
Hello @mrava87 , thank you for raising this issue. Indeed it would be good to support NumPy v2 but unfortunately after reading the utils code i don't understand if it's safe to remove the X = asfarray(X) call. Also how are we going to be able to support both Numpy 1.* and 2 ? Should i create a conditional branch on np.__version__ ?
@xir4n, any plan to update the library to support numpy v2.
It seems like
dtcwt/numpy/transform1d.py
usesasfarray
which has been removed - see belowFile "/home/docs/checkouts/readthedocs.org/user_builds/pylops/envs/586/lib/python3.9/site-packages/dtcwt/numpy/transform1d.py", line 51, in forward
X = asfarray(X)
File "/home/docs/checkouts/readthedocs.org/user_builds/pylops/envs/586/lib/python3.9/site-packages/dtcwt/utils.py", line 105, in asfarray
return np.asfarray(X, dtype=X.dtype)
File "/home/docs/checkouts/readthedocs.org/user_builds/pylops/envs/586/lib/python3.9/site-packages/numpy/init.py", line 397, in getattr
raise AttributeError(
AttributeError:
np.asfarray
was removed in the NumPy 2.0 release. Usenp.asarray
with a proper dtype instead.The text was updated successfully, but these errors were encountered: