Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fftn of zero size arrays #110

Open
vtavana opened this issue Jul 18, 2024 · 0 comments
Open

fftn of zero size arrays #110

vtavana opened this issue Jul 18, 2024 · 0 comments

Comments

@vtavana
Copy link
Collaborator

vtavana commented Jul 18, 2024

Following example returns an empty array

import mkl_fft.interfaces as mfi, numpy
a=numpy.ones((2,0,4))
mfi.numpy_fft.fftn(a)
# array([], shape=(2, 0, 4), dtype=complex128)

mfi.numpy_fft.fftn(a, axes=(1,))
# array([], shape=(2, 0, 4), dtype=complex128)

while stock NumPy raises a ValueError

import numpy
a=numpy.ones((2,0,4))
numpy.fft.fftn(a)
# ValueError: Invalid number of FFT data points (0) specified.

numpy.fft.fftn(a, axes=(1,))
# ValueError: Invalid number of FFT data points (0) specified.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant