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

Support plan_inv for ScaledPlan's #77

Merged
merged 3 commits into from
Aug 18, 2022
Merged

Conversation

gaurav-arya
Copy link
Contributor

Fixes a downstream issue in FFTW's tests caused by #72

# functionally identical plans
for P in [plan_rfft(x, dims), inv(plan_irfft(ry, size(x, dims), dims)),
AbstractFFTs.plan_inv(plan_irfft(ry, size(x, dims), dims))]
@test eltype(P) <: Real
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other than add the loop over P, the only other change I made was to this assertion. Previously the assertion was that the eltype should be Int here. That doesn't seem right (for FFTW the eltype would be Float64); rather than thinking too hard about what the test plan implementation should be doing (it's probably underspecified), I just made the check a little looser.

@codecov
Copy link

codecov bot commented Aug 18, 2022

Codecov Report

Merging #77 (a93d5a4) into master (03ef58b) will increase coverage by 1.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #77      +/-   ##
==========================================
+ Coverage   83.09%   84.13%   +1.04%     
==========================================
  Files           2        2              
  Lines         207      208       +1     
==========================================
+ Hits          172      175       +3     
+ Misses         35       33       -2     
Impacted Files Coverage Δ
src/definitions.jl 68.26% <100.00%> (+2.24%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@gaurav-arya
Copy link
Contributor Author

To clarify what's happening here, it's a one-line fix for the downstream issue. I added a few more tests to cover plan_inv, and while doing so I found it helpful to port over a fix to the test plans I had made in a different PR to avoid real ffts sometimes having a complex eltype.

Copy link
Member

@devmotion devmotion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@devmotion devmotion merged commit 4b57f54 into JuliaMath:master Aug 18, 2022
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