Skip to content

Commit 02a55ac

Browse files
committed
1 parent a25656d commit 02a55ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/AbstractFFTsChainRulesCoreExt.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function ChainRulesCore.rrule(::typeof(rfft), x::AbstractArray{<:Real}, dims)
3737

3838
project_x = ChainRulesCore.ProjectTo(x)
3939
function rfft_pullback(ȳ)
40-
= project_x(brfft(ChainRulesCore.unthunk(ȳ) ./ scale, d, dims))
40+
= project_x(brfft(ChainRulesCore.unthunk(ȳ) ./ typeof(x)(scale), d, dims))
4141
return ChainRulesCore.NoTangent(), x̄, ChainRulesCore.NoTangent()
4242
end
4343
return y, rfft_pullback

0 commit comments

Comments
 (0)