Skip to content

Commit

Permalink
fix: use real part of irfft output
Browse files Browse the repository at this point in the history
  • Loading branch information
IanButterworth committed Jan 24, 2024
1 parent a6a3cce commit d2f47a6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/imfilter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -874,8 +874,7 @@ end
function filtfft(A, krn, planned_rfft1::Function, planned_rfft2::Function, planned_irfft::Function)
B = planned_rfft1(A)
complex(B) .*= conj!(complex(planned_rfft2(krn)))
out = complex(planned_irfft(complex(B)))
return out
return real(planned_irfft(complex(B)))
end
filtfft(A, krn, ::Nothing, ::Nothing, ::Nothing) = filtfft(A, krn)
function filtfft(A, krn)
Expand Down

0 comments on commit d2f47a6

Please sign in to comment.