@@ -284,8 +284,7 @@ Base.@propagate_inbounds function _getindex(A::AbstractDiffEqArray, ::ScalarSymb
284284 return getindex .(A. u, variable_index .((A,), (sym,), eachindex (A. t)))
285285 end
286286 elseif is_parameter (A, sym)
287- Base. depwarn (" Indexing with parameters is deprecated. Use `getp(A, $sym )` for parameter indexing." , :parameter_getindex )
288- return getp (A, sym)(A)
287+ error (" Indexing with parameters is deprecated. Use `getp(A, $sym )` for parameter indexing." )
289288 elseif is_observed (A, sym)
290289 return observed (A, sym).(A. u, (parameter_values (A),), A. t)
291290 else
325324
326325Base. @propagate_inbounds function _getindex (A:: AbstractDiffEqArray , :: ScalarSymbolic , sym:: Union{Tuple,AbstractArray} )
327326 if all (x -> is_parameter (A, x), sym)
328- Base. depwarn (" Indexing with parameters is deprecated. Use `getp(A, $sym )` for parameter indexing." , :parameter_getindex )
329- return getp (A, sym)(A)
327+ error (" Indexing with parameters is deprecated. Use `getp(A, $sym )` for parameter indexing." )
330328 else
331329 return [getindex .((A,), sym, i) for i in eachindex (A. t)]
332330 end
@@ -336,6 +334,14 @@ Base.@propagate_inbounds function _getindex(A::AbstractDiffEqArray, ::ScalarSymb
336334 return reduce (vcat, map (s -> A[s, args... ]' , sym))
337335end
338336
337+ Base. @propagate_inbounds function _getindex (A:: AbstractDiffEqArray , :: ScalarSymbolic , :: SymbolicIndexingInterface.SolvedVariables , args... )
338+ return getindex (A, variable_symbols (A), args... )
339+ end
340+
341+ Base. @propagate_inbounds function _getindex (A:: AbstractDiffEqArray , :: ScalarSymbolic , :: SymbolicIndexingInterface.AllVariables , args... )
342+ return getindex (A, all_variable_symbols (A), args... )
343+ end
344+
339345Base. @propagate_inbounds function Base. getindex (A:: AbstractVectorOfArray , _arg, args... )
340346 symtype = symbolic_type (_arg)
341347 elsymtype = symbolic_type (eltype (_arg))
0 commit comments