Commit 09c17c1e authored by Martin Reinecke's avatar Martin Reinecke
Browse files

Merge branch 'fft_tweaks' of gitlab.mpcdf.mpg.de:ift/nifty-dev into fft_tweaks

parents fb4362ec 3ac479c4
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
import numpy as np import numpy as np
import pytest import pytest
from numpy.testing import assert_allclose from numpy.testing import assert_, assert_allclose
import nifty5 as ift import nifty5 as ift
...@@ -36,6 +36,16 @@ dtype = list2fixture([np.float64, np.float32, np.complex64, np.complex128]) ...@@ -36,6 +36,16 @@ dtype = list2fixture([np.float64, np.float32, np.complex64, np.complex128])
op = list2fixture([ift.HartleyOperator, ift.FFTOperator]) op = list2fixture([ift.HartleyOperator, ift.FFTOperator])
fftw = list2fixture([False, True]) fftw = list2fixture([False, True])
def test_switch():
ift.fft.enable_fftw()
assert_(ift.fft._use_fftw is True)
ift.fft.disable_fftw()
assert_(ift.fft._use_fftw is False)
ift.fft.enable_fftw()
assert_(ift.fft._use_fftw is True)
@pmp('d', [0.1, 1, 3.7]) @pmp('d', [0.1, 1, 3.7])
def test_fft1D(d, dtype, op, fftw): def test_fft1D(d, dtype, op, fftw):
if fftw: if fftw:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment