Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

issymbollike() has been extracted into SymbolicsBase package (Fixes #264) #265

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Requires = "ae029012-a4dd-5104-9daa-d747884805df"
StaticArraysCore = "1e83bf80-4336-4d27-bf5d-d5a4f845583c"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
SymbolicIndexingInterface = "2efcf032-c050-4f8e-a9bb-153293bab1f5"
SymbolicsBase = "13454fcc-48b2-433e-829a-0418001dc7cb"
Tables = "bd369af6-aec1-5ad0-b16a-f7cc5008161c"

[compat]
Expand All @@ -27,6 +28,7 @@ RecipesBase = "0.7, 0.8, 1.0"
Requires = "1.0"
StaticArraysCore = "1.1"
SymbolicIndexingInterface = "0.1, 0.2"
SymbolicsBase = "0.1.0"
Tables = "1"
Zygote = "0.6.56"
julia = "1.6"
Expand Down
6 changes: 5 additions & 1 deletion src/RecursiveArrayTools.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ import Adapt

import Tables, IteratorInterfaceExtensions

import SymbolicsBase: AllObserved, issymbollike
# Re-export from SymbolicsBase
export AllObserved

abstract type AbstractVectorOfArray{T, N, A} <: AbstractArray{T, N} end
abstract type AbstractDiffEqArray{T, N, A} <: AbstractVectorOfArray{T, N, A} end

Expand All @@ -38,7 +42,7 @@ import Requires
end

export VectorOfArray, DiffEqArray, AbstractVectorOfArray, AbstractDiffEqArray,
AllObserved, vecarr_to_vectors, tuples
vecarr_to_vectors, tuples

export recursivecopy, recursivecopy!, recursivefill!, vecvecapply, copyat_or_push!,
vecvec_to_mat, recursive_one, recursive_mean, recursive_bottom_eltype,
Expand Down
9 changes: 0 additions & 9 deletions src/vector_of_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,9 @@ mutable struct DiffEqArray{T, N, A, B, C, E, F} <: AbstractDiffEqArray{T, N, A}
p::F
end
### Abstract Interface
struct AllObserved
end

Base.@pure __parameterless_type(T) = Base.typename(T).wrapper

@generated function issymbollike(x)
x <: Union{Symbol, AllObserved} && return true
ss = ["Operation", "Variable", "Sym", "Num", "Term"]
s = string(Symbol(__parameterless_type(x)))
any(x -> occursin(x, s), ss)
end

function Base.Array(VA::AbstractVectorOfArray{T, N, A}) where {T, N,
A <: AbstractVector{
<:AbstractVector
Expand Down