We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a25656d commit 02a55acCopy full SHA for 02a55ac
ext/AbstractFFTsChainRulesCoreExt.jl
@@ -37,7 +37,7 @@ function ChainRulesCore.rrule(::typeof(rfft), x::AbstractArray{<:Real}, dims)
37
38
project_x = ChainRulesCore.ProjectTo(x)
39
function rfft_pullback(ȳ)
40
- x̄ = project_x(brfft(ChainRulesCore.unthunk(ȳ) ./ scale, d, dims))
+ x̄ = project_x(brfft(ChainRulesCore.unthunk(ȳ) ./ typeof(x)(scale), d, dims))
41
return ChainRulesCore.NoTangent(), x̄, ChainRulesCore.NoTangent()
42
end
43
return y, rfft_pullback
0 commit comments