Skip to content

Commit 9487c97

Browse files
add Functors
1 parent e8073ba commit 9487c97

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/ComponentArrays.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module ComponentArrays
22

33
import ChainRulesCore
4-
import StaticArrayInterface, ArrayInterface
4+
import StaticArrayInterface, ArrayInterface, Functors
55

66
using LinearAlgebra
77

src/compat/chainrulescore.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ end
1919
(p::ChainRulesCore.ProjectTo{ComponentArray})(dx::AbstractArray) = ComponentArray(p.project(dx), p.axes)
2020

2121
function (p::ChainRulesCore.ProjectTo{ComponentArray})(t::ChainRulesCore.Tangent{A, <:NamedTuple}) where {A}
22-
nt = fmap(ChainRulesCore.backing, ChainRulesCore.backing(t))
22+
nt = Functors.fmap(ChainRulesCore.backing, ChainRulesCore.backing(t))
2323
return ComponentArray(nt)
2424
end

0 commit comments

Comments
 (0)