Skip to content

Commit d2cb28c

Browse files
committed
Allow nothing indepsym
1 parent e6fed29 commit d2cb28c

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/vector_of_array.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ DiffEqArray(vec::AbstractVector{T}, ts, ::NTuple{N}) where {T, N} = DiffEqArray{
4343
# Assume that the first element is representative of all other elements
4444
DiffEqArray(vec::AbstractVector,ts::AbstractVector) = DiffEqArray(vec, ts, (size(vec[1])..., length(vec)))
4545
DiffEqArray(vec::AbstractVector{VT},ts::AbstractVector) where {T, N, VT<:AbstractArray{T, N}} = DiffEqArray{T, N+1, typeof(vec), typeof(ts), Nothing, Nothing, Nothing, Nothing}(vec, ts, nothing, nothing, nothing, nothing)
46-
DiffEqArray(vec::AbstractVector{VT},ts::AbstractVector, syms::Vector{Symbol}, indepsym::Symbol, observed::Function, p) where {T, N, VT<:AbstractArray{T, N}} = DiffEqArray{T, N+1, typeof(vec), typeof(ts), typeof(syms), typeof(indepsym), typeof(observed), typeof(p)}(vec, ts, syms, indepsym, observed, p)
46+
function DiffEqArray(vec::AbstractVector{VT},ts::AbstractVector, syms::Vector{Symbol}, indepsym, observed::Function, p) where {T, N, VT<:AbstractArray{T, N}}
47+
DiffEqArray{T, N+1, typeof(vec), typeof(ts), typeof(syms), typeof(indepsym), typeof(observed), typeof(p)}(vec, ts, syms, indepsym, observed, p)
48+
end
4749

4850
# Interface for the linear indexing. This is just a view of the underlying nested structure
4951
@inline Base.firstindex(VA::AbstractVectorOfArray) = firstindex(VA.u)

0 commit comments

Comments
 (0)