Open
Description
Following example returns an error
import mkl_fft.interfaces as mfi, numpy
b=numpy.array([[5, 7, 6, 5], [4, 6, 4, 8], [9, 3, 7, 5]], dtype=numpy.float32)
mfi.numpy_fft.fftn(b, axes=(), s=None, norm="forward")
# TypeError: copyto() argument 1 must be numpy.ndarray, not numpy.complex64
while stock NumPy works correctly
import numpy
b=numpy.array([[5, 7, 6, 5], [4, 6, 4, 8], [9, 3, 7, 5]], dtype=numpy.float32)
numpy.fft.fftn(b, axes=(), s=None, norm="forward")
# array([[5., 7., 6., 5.],
# [4., 6., 4., 8.],
# [9., 3., 7., 5.]], dtype=float32)
dtype
of input array plays a role here. if dtype=numpy.int64
, both stock NumPy and mkl_fft
returns the same result.
Metadata
Metadata
Assignees
Labels
No labels