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

switch back testing of irfftn shapes #309

Merged
merged 1 commit into from
Nov 20, 2024
Merged

Conversation

ev-br
Copy link
Contributor

@ev-br ev-br commented Nov 18, 2024

I believe this is a correct interpretation of https://numpy.org/doc/stable/reference/generated/numpy.fft.irfftn.html

cross-ref gh-301

@asmeurer
Copy link
Member

Good to always check the standard itself (because sometimes there are typos in the standard, and sometimes it intentionally deviates from numpy) https://data-apis.org/array-api/latest/extensions/generated/array_api.fft.irfftn.html#irfftn. In this case, I think it also matches.

@asmeurer
Copy link
Member

But maybe you could double check yourself if it looks like the standard agrees with this. If so, let's merge this. If not, most likely we need to issue a fix to the standard (for fft it was mostly intended to match numpy; I already made a lot of fixes at data-apis/array-api#720, but I wouldn't be surprised if I missed something)

@ev-br
Copy link
Contributor Author

ev-br commented Nov 20, 2024

Double-checked the text of the standard, and it does look like it agrees.

At some point we might want to add a test that irfftn(rfftn(x)) == x up to numerical accuracy, as stipulated in the standard. However this should be done across the whole fft extension (fft(ifft(x)) == x etc if at all---this is value testing which is probably best left to the array libraries themselves.

Merging, thanks Aaron for the review!

@ev-br ev-br merged commit d7bfe73 into data-apis:master Nov 20, 2024
4 checks passed
@ev-br ev-br mentioned this pull request Nov 20, 2024
34 tasks
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

Successfully merging this pull request may close these issues.

2 participants