From ce4b83da432b03b7e7d95663653d3b701daaf81d Mon Sep 17 00:00:00 2001 From: mrava87 Date: Fri, 4 Oct 2024 21:04:41 +0300 Subject: [PATCH] bug: fix chirpradon3d pyfftw import Remove any direct access to pyfftw and instead use pyfftw_message to check if the library is installed and correctly imported. --- pylops/signalprocessing/chirpradon3d.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pylops/signalprocessing/chirpradon3d.py b/pylops/signalprocessing/chirpradon3d.py index 1f544926..f1153ce5 100755 --- a/pylops/signalprocessing/chirpradon3d.py +++ b/pylops/signalprocessing/chirpradon3d.py @@ -101,7 +101,7 @@ def __init__( @reshaped def _matvec(self, x: NDArray) -> NDArray: - if self.engine == "fftw" and pyfftw is not None: + if self.engine == "fftw" and pyfftw_message is None: return _chirp_radon_3d_fftw( x, self.dt, self.dy, self.dx, self.pmax, mode="f", **self.kwargs_fftw ) @@ -109,7 +109,7 @@ def _matvec(self, x: NDArray) -> NDArray: @reshaped def _rmatvec(self, x: NDArray) -> NDArray: - if self.engine == "fftw" and pyfftw is not None: + if self.engine == "fftw" and pyfftw_message is None: return _chirp_radon_3d_fftw( x, self.dt, self.dy, self.dx, self.pmax, mode="a", **self.kwargs_fftw ) @@ -117,7 +117,7 @@ def _rmatvec(self, x: NDArray) -> NDArray: def inverse(self, x: NDArray) -> NDArray: x = x.reshape(self.dimsd) - if self.engine == "fftw" and pyfftw is not None: + if self.engine == "fftw" and pyfftw_message is None: y = _chirp_radon_3d_fftw( x, self.dt, self.dy, self.dx, self.pmax, mode="i", **self.kwargs_fftw )