Commit 5d5a2701 authored by Theo Steininger's avatar Theo Steininger

small modification to test_fft_operator.py

parent 7c50e35f
Pipeline #14853 passed with stages
in 13 minutes and 53 seconds
...@@ -77,10 +77,13 @@ class FFTOperatorTests(unittest.TestCase): ...@@ -77,10 +77,13 @@ class FFTOperatorTests(unittest.TestCase):
b = RGSpace(dim1, zerocenter=zc2, distances=1./(dim1*d), harmonic=True) b = RGSpace(dim1, zerocenter=zc2, distances=1./(dim1*d), harmonic=True)
fft = FFTOperator(domain=a, target=b, domain_dtype=itp, fft = FFTOperator(domain=a, target=b, domain_dtype=itp,
target_dtype=_harmonic_type(itp), module=module) target_dtype=_harmonic_type(itp), module=module)
np.random.seed(16)
inp = Field.from_random(domain=a, random_type='normal', std=7, mean=3, inp = Field.from_random(domain=a, random_type='normal', std=7, mean=3,
dtype=itp) dtype=itp)
out = fft.adjoint_times(fft.times(inp)) out = fft.adjoint_times(fft.times(inp))
assert_allclose(inp.val, out.val, rtol=tol, atol=tol) assert_allclose(inp.val.get_full_data(),
out.val.get_full_data(),
rtol=tol, atol=tol)
@expand(product(["numpy", "fftw", "fftw_mpi"], @expand(product(["numpy", "fftw", "fftw_mpi"],
[10, 11], [9, 12], [False, True], [10, 11], [9, 12], [False, True],
......
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