@@ -59,15 +59,14 @@ Base.@propagate_inbounds Base.getindex(VA::AbstractVectorOfArray{T, N}, I::Colon
5959Base. @propagate_inbounds Base. getindex (VA:: AbstractVectorOfArray{T, N} , I:: AbstractArray{Int} ) where {T, N} = VectorOfArray (VA. u[I])
6060Base. @propagate_inbounds Base. getindex (VA:: AbstractDiffEqArray{T, N} , I:: AbstractArray{Int} ) where {T, N} = DiffEqArray (VA. u[I],VA. t[I])
6161Base. @propagate_inbounds function Base. getindex (A:: AbstractDiffEqArray{T, N} ,sym) where {T, N}
62- if issymbollike (sym)
62+ if issymbollike (sym) && A . syms != = nothing
6363 i = findfirst (isequal (Symbol (sym)),A. syms)
6464 else
6565 i = sym
6666 end
6767
6868 if i === nothing
69- # TODO : Check if system actually has a indepsym
70- if issymbollike (i) && Symbol (i) == A. indepsym
69+ if issymbollike (i) && A. indepsym != = nothing && Symbol (i) == A. indepsym
7170 A. t
7271 else
7372 observed (A,sym,:)
@@ -77,15 +76,14 @@ Base.@propagate_inbounds function Base.getindex(A::AbstractDiffEqArray{T, N},sym
7776 end
7877end
7978Base. @propagate_inbounds function Base. getindex (A:: AbstractDiffEqArray{T, N} ,sym,args... ) where {T, N}
80- if issymbollike (sym)
79+ if issymbollike (sym) && A . syms != = nothing
8180 i = findfirst (isequal (Symbol (sym)),A. syms)
8281 else
8382 i = sym
8483 end
8584
8685 if i === nothing
87- # TODO : Check if system actually has a indepsym
88- if issymbollike (i) && Symbol (i) == A. indepsym
86+ if issymbollike (i) && A. indepsym != = nothing && Symbol (i) == A. indepsym
8987 A. t[args... ]
9088 else
9189 observed (A,sym,args... )
0 commit comments