Skip to content

[fft] Optimize fftfreq logic#75

Merged
chaoming0625 merged 2 commits intomainfrom
fft-fix
Dec 6, 2024
Merged

[fft] Optimize fftfreq logic#75
chaoming0625 merged 2 commits intomainfrom
fft-fix

Conversation

@Routhleck
Copy link
Collaborator

@Routhleck Routhleck commented Dec 6, 2024

This pull request includes changes to the brainunit/fft/_fft_change_unit.py file, specifically focusing on improving exception handling and compatibility with different Python versions. The most important changes include replacing generic exceptions with KeyError and adding version checks for Python 3.10 and above.

Improvements to exception handling:

  • Replaced generic except statements with except KeyError in the fftfreq and rfftfreq functions. [1] [2]

Compatibility with Python versions:

  • Added version checks for Python 3.10 and above to handle the device parameter in the fftfreq and rfftfreq functions. [1] [2]

@Routhleck Routhleck marked this pull request as ready for review December 6, 2024 12:24
@chaoming0625 chaoming0625 merged commit ea46d4b into main Dec 6, 2024
@chaoming0625 chaoming0625 deleted the fft-fix branch December 6, 2024 12:30
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