File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 24
24
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25
25
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
26
27
- # Added for completing the namespaces
28
- from numpy .fft import fftfreq , fftshift , ifftshift , rfftfreq
27
+ import numpy as np
28
+
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
29
36
30
37
# pylint: disable=no-name-in-module
31
38
from ._numpy_fft import (
You can’t perform that action at this time.
0 commit comments