Skip to content

Commit b9a162c

Browse files
committed
2 parents a3ca7c1 + 9ccd7c8 commit b9a162c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ComponentArrays"
22
uuid = "b0b7db55-cfe3-40fc-9ded-d10e2dbeff66"
33
authors = ["Jonnie Diegelman <47193959+jonniedie@users.noreply.github.com>"]
4-
version = "0.12.4"
4+
version = "0.12.5"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

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)