Skip to content

Commit c264348

Browse files
committed
Minor refactor of vector_of_arrays.jl
1 parent 00380d3 commit c264348

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/vector_of_array.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Base.@propagate_inbounds function Base.getindex(A::AbstractVectorOfArray{T, N},
7777
I::AbstractArray{Bool},J::Colon...) where {T, N}
7878
@assert length(J) == ndims(A.u[1])+1-ndims(I)
7979
@assert size(I) == size(A)[1:ndims(A)-length(J)]
80-
return A[repeat([:], length(size(A)))...][I,J...]
80+
return A[ntuple(x -> Colon(), ndims(A))...][I, J...]
8181
end
8282

8383
Base.@propagate_inbounds Base.getindex(A::AbstractDiffEqArray{T, N}, i::Int,::Colon) where {T, N} = [A.u[j][i] for j in 1:length(A)]

0 commit comments

Comments
 (0)