Skip to content

Commit

Permalink
add getindex slice method for vector of numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
lxvm committed Feb 27, 2024
1 parent 96a09f3 commit d55dac2
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/vector_of_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,11 @@ Base.@propagate_inbounds function _getindex(A::AbstractVectorOfArray{T, N},
return Adapt.adapt(__parameterless_type(T),
reshape(reduce(hcat, vecs), size(A.u[1])..., length(A.u)))
end
Base.@propagate_inbounds function _getindex(A::AbstractVectorOfArray{T, N},
::NotSymbolic, I::Colon...) where {T <: Number, N}
@assert length(I) == ndims(A.u)
return A.u[I...]
end

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

0 comments on commit d55dac2

Please sign in to comment.