diff --git a/Project.toml b/Project.toml index b2ed29224..39bf8627c 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "SciMLBase" uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462" authors = ["Chris Rackauckas and contributors"] -version = "1.6.0" +version = "1.6.1" [deps] ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9" diff --git a/src/solutions/solution_interface.jl b/src/solutions/solution_interface.jl index 36b040b97..fd2d1b8be 100644 --- a/src/solutions/solution_interface.jl +++ b/src/solutions/solution_interface.jl @@ -20,7 +20,9 @@ Base.show(io::IO, m::MIME"text/plain", A::AbstractNoTimeSolution) = (print(io,"u for T in [Int, Colon] @eval Base.@propagate_inbounds Base.getindex(A::AbstractTimeseriesSolution, I::$T) = A.u[I] end -Base.@propagate_inbounds Base.getindex(A::AbstractTimeseriesSolution, I::Union{Int,AbstractArray{Int},CartesianIndex,Colon}...) = A.u[I[end]][Base.front(I)...] +Base.@propagate_inbounds function Base.getindex(A::AbstractTimeseriesSolution, I::Union{Int,AbstractArray{Int},CartesianIndex,Colon}...) + RecursiveArrayTools.VectorOfArray(A.u)[I...] +end Base.@propagate_inbounds Base.getindex(A::AbstractTimeseriesSolution, i::Int,::Colon) = [A.u[j][i] for j in 1:length(A)] Base.@propagate_inbounds Base.getindex(A::AbstractTimeseriesSolution, ::Colon,i::Int) = A.u[i] Base.@propagate_inbounds Base.getindex(A::AbstractTimeseriesSolution, i::Int,II::AbstractArray{Int}) = [A.u[j][i] for j in II]