Repository navigation
Add fftshift/ifftshift - #2321
Merged
Merged
Conversation
As there is a lot of similarity between the `ifftshift` and `fftshift` functions, this refactors out a common more general function that applies to both use cases. Should help reduce the amount of code involved and keep things maintainable.
Simply compares the results of Dask Array's [i]fftshift with results from NumPy's [i]fftshift. Tries various combinations of axes to make sure the same results are gotten for all cases.
To ensure that applying `fftshift` and then `ifftshift` or vice versa always yields the original array unchanged, add a test along these lines for Dask Arrays.
Member
|
LGTM. |
jakirkham
commented
May 10, 2017
| return r | ||
|
|
||
|
|
||
| @wraps(np.fft.fftshift) |
Member
Author
There was a problem hiding this comment.
This wrapper is not strictly needed here. It is only here as it is a holdover from the code being refactored. Added PR ( #2323 ) to address this.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #2124
Adds equivalents of NumPy's
fftshiftandifftshiftfunctions for Dask Arrays. Also includes tests to ensure that the results with Dask are equivalent to those with NumPy. Further add some identity tests to ensure that applyingfftshiftand thenifftshiftor vice versa return the original array unchanged.