File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -92,7 +92,9 @@ def _is_tls_initialized():
9292def patch_numpy_fft (verbose = False ):
9393 if verbose :
9494 print ("Now patching NumPy FFT submodule with mkl_fft NumPy interface." )
95- print ("Please direct bug reports to https://github.com/IntelPython/mkl_fft" )
95+ print (
96+ "Please direct bug reports to https://github.com/IntelPython/mkl_fft"
97+ )
9698 if not _is_tls_initialized ():
9799 _initialize_tls ()
98100 _tls .patch .do_patch ()
Original file line number Diff line number Diff line change 3030
3131
3232def test_patch ():
33- mkl_fft . restore_numpy_fft ()
33+ old_module = np . fft . fft . __module__
3434 assert not mkl_fft .is_patched ()
35- assert (np .fft .fft .__module__ == "numpy.fft" )
3635
3736 mkl_fft .patch_numpy_fft () # Enable mkl_fft in Numpy
3837 assert mkl_fft .is_patched ()
39- assert ( np .fft .fft .__module__ == _nfft .fft .__module__ )
38+ assert np .fft .fft .__module__ == _nfft .fft .__module__
4039
4140 mkl_fft .restore_numpy_fft () # Disable mkl_fft in Numpy
4241 assert not mkl_fft .is_patched ()
43- assert ( np .fft .fft .__module__ == "numpy.fft" )
42+ assert np .fft .fft .__module__ == old_module
You can’t perform that action at this time.
0 commit comments