Skip to content

Commit abb3e0c

Browse files
committed
Fix for another instance of the same kind of issue as #151.
1 parent 0d39879 commit abb3e0c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/zygote.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,15 +43,15 @@ function ChainRulesCore.rrule(::typeof(getproperty),A::ArrayPartition, s::Symbol
4343
A.x,literal_ArrayPartition_x_adjoint
4444
end
4545

46-
ZygoteRules.@adjoint function getindex(VA::AbstractVectorOfArray, i)
46+
ZygoteRules.@adjoint function getindex(VA::AbstractVectorOfArray, i::Int)
4747
function AbstractVectorOfArray_getindex_adjoint(Δ)
4848
Δ′ = [ (i == j ? Δ : zero(x)) for (x,j) in zip(VA.u, 1:length(VA))]
4949
(Δ′,nothing)
5050
end
5151
VA[i],AbstractVectorOfArray_getindex_adjoint
5252
end
5353

54-
ZygoteRules.@adjoint function getindex(VA::AbstractVectorOfArray, i, j...)
54+
ZygoteRules.@adjoint function getindex(VA::AbstractVectorOfArray, i::Int, j::Int...)
5555
function AbstractVectorOfArray_getindex_adjoint(Δ)
5656
Δ′ = zero(VA)
5757
Δ′[i,j...] = Δ

0 commit comments

Comments
 (0)