@@ -59,6 +59,13 @@ Base.@propagate_inbounds Base.getindex(VA::AbstractVectorOfArray{T, N}, I::Colon
5959Base. @propagate_inbounds Base. getindex (VA:: AbstractDiffEqArray{T, N} , I:: Colon ) where {T, N} = VA. u[I]
6060Base. @propagate_inbounds Base. getindex (VA:: AbstractVectorOfArray{T, N} , I:: AbstractArray{Int} ) where {T, N} = VectorOfArray (VA. u[I])
6161Base. @propagate_inbounds Base. getindex (VA:: AbstractDiffEqArray{T, N} , I:: AbstractArray{Int} ) where {T, N} = DiffEqArray (VA. u[I],VA. t[I])
62+ Base. @propagate_inbounds function Base. getindex (A:: AbstractDiffEqArray{T, N} ,
63+ I:: Union{Int,AbstractArray{Int},CartesianIndex,Colon,BitArray,AbstractArray{Bool}} ...) where {T, N}
64+ RecursiveArrayTools. VectorOfArray (A. u)[I... ]
65+ end
66+ Base. @propagate_inbounds Base. getindex (A:: AbstractDiffEqArray{T, N} , i:: Int ,:: Colon ) where {T, N} = [A. u[j][i] for j in 1 : length (A)]
67+ Base. @propagate_inbounds Base. getindex (A:: AbstractDiffEqArray{T, N} , :: Colon ,i:: Int ) where {T, N} = A. u[i]
68+ Base. @propagate_inbounds Base. getindex (A:: AbstractDiffEqArray{T, N} , i:: Int ,II:: AbstractArray{Int} ) where {T, N} = [A. u[j][i] for j in II]
6269Base. @propagate_inbounds function Base. getindex (A:: AbstractDiffEqArray{T, N} ,sym) where {T, N}
6370 if issymbollike (sym) && A. syms != = nothing
6471 i = findfirst (isequal (Symbol (sym)),A. syms)
@@ -90,7 +97,7 @@ Base.@propagate_inbounds function Base.getindex(A::AbstractDiffEqArray{T, N},sym
9097 observed (A,sym,args... )
9198 end
9299 else
93- Base. getindex .(A. u, args... )
100+ Base. getindex .(A. u, i, args... )
94101 end
95102end
96103Base. @propagate_inbounds Base. getindex (A:: AbstractDiffEqArray{T, N} , I:: Int... ) where {T, N} = A. u[I[end ]][Base. front (I)... ]
0 commit comments