Numpy v2
@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.
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__ ?