Skip to content

Add fftfreq, rfftfreq and scalar axes for fftshift/ifftshift#3298

Open
declanhealy2 wants to merge 3 commits intoml-explore:mainfrom
declanhealy2:fftfreq-and-scalar-axes
Open

Add fftfreq, rfftfreq and scalar axes for fftshift/ifftshift#3298
declanhealy2 wants to merge 3 commits intoml-explore:mainfrom
declanhealy2:fftfreq-and-scalar-axes

Conversation

@declanhealy2
Copy link
Copy Markdown

@declanhealy2 declanhealy2 commented Mar 23, 2026

Proposed changes

Add fftfreq and rfftfreq to mlx.core.fft, and allow fftshift/ifftshift to accept a scalar int for the axes parameter to match NumPy's API.

Checklist

  • I have read the CONTRIBUTING document
  • I have run pre-commit run --all-files to format my code / installed pre-commit prior to committing changes
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the necessary documentation (if needed)

@angeloskath
Copy link
Copy Markdown
Member

That looks good but can you add it to the C++ side as well and then call it from python?

@declanhealy2
Copy link
Copy Markdown
Author

Thanks for looking at this. Have now moved fftfreq and rfftfreq to the C++ side.

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.

3 participants