Skip to content

Error in calling fftn with an empty axes  #108

Open
@vtavana

Description

@vtavana

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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions