Skip to content

Commit 7367cc1

Browse files
committed
2 parents a3ca7c1 + 9ccd7c8 commit 7367cc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compat/chainrulescore.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
function ChainRulesCore.rrule(::typeof(getproperty), x::ComponentArray, s::Union{Symbol, Val})
22
function getproperty_adjoint(Δ)
3-
zero_x = ComponentArray(zeros(eltype(Δ), size(x)), getaxes(x))
3+
zero_x = zero(similar(x, eltype(Δ)))
44
setproperty!(zero_x, s, Δ)
55
return (ChainRulesCore.NoTangent(), zero_x, ChainRulesCore.NoTangent())
66
end

0 commit comments

Comments
 (0)