Skip to content

Commit

Permalink
Revert "Update vector_of_array.jl"
Browse files Browse the repository at this point in the history
This reverts commit 49d6742.
  • Loading branch information
lxvm committed Feb 27, 2024
1 parent c668130 commit 96a09f3
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/vector_of_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,13 @@ __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
return Array(A)
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)))
end

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

0 comments on commit 96a09f3

Please sign in to comment.