Closed
Description
FFT2 produces incorrect results for Fortran ordered 3D data
Example
>>> import numpy as np
>>> rng = np.random.RandomState(42)
>>> X_c = rng.rand(1024, 1024, 1).astype(np.complex128)
>>> X_f = X_c.astype(X_c.dtype, order='F')
>>> import mkl_fft
>>> np.abs(mkl_fft.fft2(X_c, axes=(0, 1))).max()
524549.9849164942
>>> np.abs(mkl_fft.fft2(X_f, axes=(0, 1))).max()
/home/rth/.miniconda3/envs/insight-gui/lib/python3.6/site-packages/numpy/core/_methods.py:28: RuntimeWarning: invalid value encountered in reduce
return umr_maximum(a, axis, None, out, keepdims, initial)
nan
>>> np.abs(mkl_fft.fft2(X_f[:, :, 0], axes=(0, 1))).max()
524549.9849164942
Versions
Python 3.6, Linux, numpy 1.15.4, mkl_fft 1.0.6 (from the default conda channel).
Metadata
Metadata
Assignees
Labels
No labels