Skip to content

Commit 794b052

Browse files
committed
separate import process
1 parent 93ee167 commit 794b052

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

mkl_fft/interfaces/numpy_fft.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@
2424
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
2525
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626

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
36-
3727
# pylint: disable=no-name-in-module
3828
from ._numpy_fft import (
3929
fft,
@@ -67,8 +57,9 @@
6757
"irfftn",
6858
"hfft",
6959
"ihfft",
70-
"fftshift",
71-
"ifftshift",
72-
"fftfreq",
73-
"rfftfreq",
7460
]
61+
62+
# Added for completing the namespaces
63+
from numpy.fft import fftfreq, fftshift, ifftshift, rfftfreq
64+
65+
__all__ += ["fftshift", "ifftshift", "fftfreq", "rfftfreq"]

0 commit comments

Comments
 (0)