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

rfftn/fftn shape mismatch with NumPy when s is specified? #8248

Open
leofang opened this issue Mar 19, 2024 · 0 comments
Open

rfftn/fftn shape mismatch with NumPy when s is specified? #8248

leofang opened this issue Mar 19, 2024 · 0 comments

Comments

@leofang
Copy link
Member

leofang commented Mar 19, 2024

xref: data-apis/array-api-compat#78 (comment)

>>> import numpy as np
>>> x = np.zeros((3, 2))
>>> np.fft.rfftn(x, s=(3, 2), axes=(1, 0), norm='ortho')
array([[0.+0.j, 0.+0.j, 0.+0.j],
       [0.+0.j, 0.+0.j, 0.+0.j]])
>>> np.fft.rfftn(x, s=(3, 2), axes=(1, 0), norm='ortho').shape
(2, 3)
>>> import cupy as cp
>>> x = cp.zeros((3, 2))
>>> cp.fft.rfftn(x, s=(3, 2), axes=(1, 0), norm='ortho').shape
(2, 2)
>>> cp.fft.rfftn(x, s=(3, 2), axes=(1, 0), norm='ortho')
array([[0.+0.j, 0.+0.j],
       [0.+0.j, 0.+0.j]])

and a similar issue exists for fftn.

Originally posted by @asmeurer in data-apis/array-api-compat#78 (comment)

@leofang leofang added the cat:bug Bugs label Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants