From 3263763d71fc10063793926e25edfbdeb57be9bb Mon Sep 17 00:00:00 2001 From: Sharan Yalburgi Date: Mon, 5 Jul 2021 22:57:32 +0530 Subject: [PATCH] Fix issymbollike --- src/vector_of_array.jl | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/vector_of_array.jl b/src/vector_of_array.jl index 89a016aa..615dc793 100644 --- a/src/vector_of_array.jl +++ b/src/vector_of_array.jl @@ -19,13 +19,15 @@ parameterless_type(x::Type) = __parameterless_type(x) ### Abstract Interface struct AllObserved end -issymbollike(x) = x isa Symbol || - x isa AllObserved || - Symbol(parameterless_type(typeof(x))) == :Operation || - Symbol(parameterless_type(typeof(x))) == :Variable || - Symbol(parameterless_type(typeof(x))) == :Sym || - Symbol(parameterless_type(typeof(x))) == :Num || - Symbol(parameterless_type(typeof(x))) == :Term +function issymbollike(x) + x isa Symbol || + x isa AllObserved || + Symbol(parameterless_type(typeof(x))) == :Operation || Symbol(parameterless_type(typeof(x))) == Symbol("SymbolicUtils.Operation") || + Symbol(parameterless_type(typeof(x))) == :Variable || Symbol(parameterless_type(typeof(x))) == Symbol("Symbolics.Variable") || + Symbol(parameterless_type(typeof(x))) == :Sym || Symbol(parameterless_type(typeof(x))) == Symbol("SymbolicUtils.Sym") || + Symbol(parameterless_type(typeof(x))) == :Num || Symbol(parameterless_type(typeof(x))) == Symbol("Symbolics.Num") || + Symbol(parameterless_type(typeof(x))) == :Term || Symbol(parameterless_type(typeof(x))) == Symbol("SymbolicUtils.Term") +end Base.Array(VA::AbstractVectorOfArray{T,N,A}) where {T,N,A <: AbstractVector{<:AbstractVector}} = reduce(hcat,VA.u) Base.Array(VA::AbstractVectorOfArray{T,N,A}) where {T,N,A <: AbstractVector{<:Number}} = VA.u