Commit 85cd0445 authored by Theo Steininger's avatar Theo Steininger

Fixed test in rg_transforms.py MPIFFT

parent d475ed86
Pipeline #15057 canceled with stage
in 1 minute and 11 seconds
......@@ -373,10 +373,16 @@ class MPIFFT(Transform):
original_shape = inp.shape
inp = inp.reshape(inp.shape[0], 1)
axes = (0, )
if original_shape[0]%2!=0:
raise AttributeError("MPI-FFTs of onedimensional arrays "
"with odd length are currently not supported due to a "
"bug in FFTW. Please use a grid with even length.")
if axes is None:
global_shape = val.shape
else:
global_shape = (val.shape[axes[0]], )
if global_shape[0] % 2 != 0:
raise AttributeError(
"MPI-FFTs of onedimensional arrays with odd length "
"are currently not supported due to a bug in FFTW. "
"Please use a grid with even length.")
if current_info is None:
transform_shape = list(inp.shape)
......
......@@ -63,7 +63,7 @@ class FFTOperatorTests(unittest.TestCase):
assert_equal(res[zc1 * (dim1 // 2), zc2 * (dim2 // 2)], 0.)
@expand(product(["numpy", "fftw", "fftw_mpi"],
[12, ], [False, True], [False, True],
[16, ], [False, True], [False, True],
[0.1, 1, 3.7],
[np.float64, np.complex128, np.float32, np.complex64]))
def test_fft1D(self, module, dim1, zc1, zc2, d, itp):
......
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