Skip to content

Commit

Permalink
hotfix index forwarding
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisRackauckas committed Feb 6, 2021
1 parent a6082ff commit 2851d04
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "SciMLBase"
uuid = "0bca4576-84f4-4d90-8ffe-ffa030f20462"
authors = ["Chris Rackauckas <[email protected]> and contributors"]
version = "1.6.0"
version = "1.6.1"

[deps]
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"
Expand Down
4 changes: 3 additions & 1 deletion src/solutions/solution_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 2851d04

Please sign in to comment.