Skip to content

Commit 16de275

Browse files
Indepvar should be stored as a vector
1 parent f543c86 commit 16de275

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/vector_of_array.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,11 @@ VectorOfArray(vec::AbstractVector{T}, ::NTuple{N}) where {T, N} = VectorOfArray{
9393
VectorOfArray(vec::AbstractVector) = VectorOfArray(vec, (size(vec[1])..., length(vec)))
9494
VectorOfArray(vec::AbstractVector{VT}) where {T, N, VT<:AbstractArray{T, N}} = VectorOfArray{T, N+1, typeof(vec)}(vec)
9595

96-
DiffEqArray(vec::AbstractVector{T}, ts, ::NTuple{N}, syms=nothing, indepsym=nothing, observed=nothing, p=nothing) where {T, N} = DiffEqArray{eltype(T), N, typeof(vec), typeof(ts), SymbolCache{typeof(syms), typeof(indepsym), Nothing}, typeof(observed), typeof(p)}(vec, ts, SymbolCache(syms, indepsym, nothing), observed, p)
96+
DiffEqArray(vec::AbstractVector{T}, ts, ::NTuple{N}, syms=nothing, indepsym=nothing, observed=nothing, p=nothing) where {T, N} = DiffEqArray{eltype(T), N, typeof(vec), typeof(ts), SymbolCache{typeof(syms), Vector{typeof(indepsym)}, Nothing}, typeof(observed), typeof(p)}(vec, ts, SymbolCache(syms, [indepsym], nothing), observed, p)
9797
# Assume that the first element is representative of all other elements
9898
DiffEqArray(vec::AbstractVector,ts::AbstractVector, syms=nothing, indepsym=nothing, observed=nothing, p=nothing) = DiffEqArray(vec, ts, (size(vec[1])..., length(vec)), syms, indepsym, observed, p)
9999
function DiffEqArray(vec::AbstractVector{VT},ts::AbstractVector, syms=nothing, indepsym=nothing, observed=nothing, p=nothing) where {T, N, VT<:AbstractArray{T, N}}
100-
DiffEqArray{T, N+1, typeof(vec), typeof(ts), SymbolCache{typeof(syms), typeof(indepsym), Nothing}, typeof(observed), typeof(p)}(vec, ts, SymbolCache(syms, indepsym, nothing), observed, p)
100+
DiffEqArray{T, N+1, typeof(vec), typeof(ts), SymbolCache{typeof(syms), Vector{typeof(indepsym)}, Nothing}, typeof(observed), typeof(p)}(vec, ts, SymbolCache(syms, [indepsym], nothing), observed, p)
101101
end
102102

103103
# Interface for the linear indexing. This is just a view of the underlying nested structure

0 commit comments

Comments
 (0)