You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
functionDiffEqArray(vec::AbstractVector{VT},ts::AbstractVector, syms=nothing, indepsym=nothing, observed=nothing, p=nothing) where {T, N, VT<:AbstractArray{T, N}}
@@ -103,6 +103,13 @@ Base.@propagate_inbounds function Base.getindex(A::AbstractDiffEqArray{T, N},sym
103
103
end
104
104
Base.@propagate_inbounds Base.getindex(A::AbstractDiffEqArray{T, N}, I::Int...) where {T, N} = A.u[I[end]][Base.front(I)...]
105
105
Base.@propagate_inbounds Base.getindex(A::AbstractDiffEqArray{T, N}, i::Int) where {T, N} = A.u[i]
106
+
Base.@propagate_inboundsfunction Base.getindex(VA::AbstractDiffEqArray{T,N}, ii::CartesianIndex) where {T, N}
107
+
ti =Tuple(ii)
108
+
i =last(ti)
109
+
jj =CartesianIndex(Base.front(ti))
110
+
return VA.u[i][jj]
111
+
end
112
+
106
113
functionobserved(A::AbstractDiffEqArray{T, N},sym,i::Int) where {T, N}
107
114
A.observed(sym,A.u[i],A.p,A.t[i])
108
115
end
@@ -150,6 +157,14 @@ end
150
157
tuples(VA::DiffEqArray) =tuple.(VA.t,VA.u)
151
158
152
159
# Growing the array simply adds to the container vector
0 commit comments