@@ -11,22 +11,25 @@ mutable struct DiffEqArray{T, N, A, B, C, D, E, F} <: AbstractDiffEqArray{T, N,
1111 observed:: E
1212 p:: F
1313end
14-
15- Base. @pure __parameterless_type (T) = Base. typename (T). wrapper
16- parameterless_type (x) = parameterless_type (typeof (x))
17- parameterless_type (x:: Type ) = __parameterless_type (x)
18-
1914# ## Abstract Interface
2015struct AllObserved
2116end
17+
18+ Base. @pure __parameterless_type (T) = Base. typename (T). wrapper
19+ const _Symbolics_Operation = Symbol (" Symbolics.Operation" )
20+ const _Symbolics_Variable = Symbol (" Symbolics.Variable" )
21+ const _Symbolics_Sym = Symbol (" Symbolics.Sym" )
22+ const _Symbolics_Num = Symbol (" Symbolics.Num" )
23+ const _Symbolics_Term = Symbol (" Symbolics.Term" )
24+ issymbollike (x:: Symbol ) = true
25+ issymbollike (x:: AllObserved ) = true
2226function issymbollike (x)
23- x isa Symbol ||
24- x isa AllObserved ||
25- Symbol (parameterless_type (typeof (x))) == :Operation || Symbol (parameterless_type (typeof (x))) == Symbol (" SymbolicUtils.Operation" ) ||
26- Symbol (parameterless_type (typeof (x))) == :Variable || Symbol (parameterless_type (typeof (x))) == Symbol (" Symbolics.Variable" ) ||
27- Symbol (parameterless_type (typeof (x))) == :Sym || Symbol (parameterless_type (typeof (x))) == Symbol (" SymbolicUtils.Sym" ) ||
28- Symbol (parameterless_type (typeof (x))) == :Num || Symbol (parameterless_type (typeof (x))) == Symbol (" Symbolics.Num" ) ||
29- Symbol (parameterless_type (typeof (x))) == :Term || Symbol (parameterless_type (typeof (x))) == Symbol (" SymbolicUtils.Term" )
27+ s = Symbol (__parameterless_type (typeof (x)))
28+ s === :Operation || s === _Symbolics_Operation ||
29+ s === :Variable || s === _Symbolics_Variable ||
30+ s === :Sym || s === _Symbolics_Sym ||
31+ s === :Num || s === _Symbolics_Num ||
32+ s === :Term || s === _Symbolics_Term
3033end
3134
3235Base. Array (VA:: AbstractVectorOfArray{T,N,A} ) where {T,N,A <: AbstractVector{<:AbstractVector} } = reduce (hcat,VA. u)
0 commit comments