We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7b7dd8b commit dc9127aCopy full SHA for dc9127a
mkl_fft/interfaces/numpy_fft.py
@@ -24,8 +24,15 @@
24
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27
-# Added for completing the namespaces
28
-from numpy.fft import fftfreq, fftshift, ifftshift, rfftfreq
+import numpy as np
+
29
+# helper functions are added for completing the namespaces
30
+if np.lib.NumpyVersion(np.__version__) < "2.0.0":
31
+ # intentionally import from the helper module to avoid circular dependency
32
+ # when patching numpy fft module with mkl_fft
33
+ from numpy.fft.helper import fftfreq, fftshift, ifftshift, rfftfreq
34
+else:
35
+ from numpy.fft._helper import fftfreq, fftshift, ifftshift, rfftfreq
36
37
# pylint: disable=no-name-in-module
38
from ._numpy_fft import (
0 commit comments