This file is intended to guide users willing to convert their codes from PyLops v1 to PyLops v2.
In the following we provide a detailed description of all the breaking changes introduced in v2, which should be used as a checklist when converting a piece of code using PyLops from v1 to v2.
- Several operators have deprecated
N
as a keyword. To migrate, pass onlydims
if bothN
anddims
are currently being passed. If onlyN
is being passed, ensure it is being passed as a value and not a keyword argument (e.g., changeFlip(N=100)
toFlip(100)
). dir
,dirs
andnodir
have been deprecated in favor ofaxis
andaxes
. When previouslynodir
was used, you must now provide the directions along which the operator is applied throughaxes
. The default value foraxis
andaxes
are chosen to be -1 and (-2, -1), respectively, whereas the defaultdir
anddirs
was 0 and (0, 1), respectively. Be careful to check all operators wheredir
,dirs
andnodir
was not provided explicitly.utils.dottest
: Changetol
intortol
. Absolute tolerance is now also supported via the keywordatol
. When calling it with purely positional arguments, note that afterrtol
comes now firstatol
beforecomplexflag
. When usingraiseerror=True
it now emits anAttributeError
instead of aValueError
.dims_fft
in the FFT operators is deprecated in favor ofdimsd
.dims_d
inSum
is deprecated in favor ordimsd