Skip to content

Commit d55dac2

Browse files
committed
add getindex slice method for vector of numbers
1 parent 96a09f3 commit d55dac2

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/vector_of_array.jl

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,11 @@ Base.@propagate_inbounds function _getindex(A::AbstractVectorOfArray{T, N},
278278
return Adapt.adapt(__parameterless_type(T),
279279
reshape(reduce(hcat, vecs), size(A.u[1])..., length(A.u)))
280280
end
281+
Base.@propagate_inbounds function _getindex(A::AbstractVectorOfArray{T, N},
282+
::NotSymbolic, I::Colon...) where {T <: Number, N}
283+
@assert length(I) == ndims(A.u)
284+
return A.u[I...]
285+
end
281286

282287
Base.@propagate_inbounds function _getindex(A::AbstractVectorOfArray{T, N},
283288
::NotSymbolic, I::AbstractArray{Bool},

0 commit comments

Comments
 (0)