Skip to content

Commit

Permalink
Update vector_of_array.jl
Browse files Browse the repository at this point in the history
  • Loading branch information
lxvm authored Feb 19, 2024
1 parent 87337d8 commit 49d6742
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/vector_of_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,7 @@ __parameterless_type(T) = Base.typename(T).wrapper
Base.@propagate_inbounds function _getindex(A::AbstractVectorOfArray{T, N},
::NotSymbolic, I::Colon...) where {T, N}
@assert length(I) == ndims(A.u[1]) + 1
vecs = if N == 1
A.u
else
vec.(A.u)
end
return Adapt.adapt(__parameterless_type(T),
reshape(reduce(hcat, vecs), size(A.u[1])..., length(A.u)))
return Array(A)
end

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

0 comments on commit 49d6742

Please sign in to comment.