Skip to content

Commit de6f956

Browse files
authored
workaround for circular dependency (#192)
1 parent aa9e5bc commit de6f956

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

mkl_fft/interfaces/numpy_fft.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +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-
# Added for completing the namespaces
28-
from numpy.fft import fftfreq, fftshift, ifftshift, rfftfreq
29-
3027
# pylint: disable=no-name-in-module
3128
from ._numpy_fft import (
3229
fft,
@@ -60,8 +57,11 @@
6057
"irfftn",
6158
"hfft",
6259
"ihfft",
63-
"fftshift",
64-
"ifftshift",
65-
"fftfreq",
66-
"rfftfreq",
6760
]
61+
62+
# It is important to put the following import here to avoid circular imports
63+
# when patching numpy with mkl_fft
64+
# Added for completing the namespaces
65+
from numpy.fft import fftfreq, fftshift, ifftshift, rfftfreq
66+
67+
__all__ += ["fftshift", "ifftshift", "fftfreq", "rfftfreq"]

0 commit comments

Comments
 (0)