Skip to content

Commit

Permalink
Merge pull request #345 from SebastianM-C/vecarr
Browse files Browse the repository at this point in the history
Fix deprecated indexing in `vecarr_to_vectors`
  • Loading branch information
ChrisRackauckas authored Jan 26, 2024
2 parents 3b3285c + 2d1736b commit f71ee39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/vector_of_array.jl
Original file line number Diff line number Diff line change
Expand Up @@ -691,7 +691,7 @@ Base.reshape(A::AbstractVectorOfArray, dims...) = Base.reshape(Array(A), dims...
@inline Base.all(f, VA::AbstractVectorOfArray) = all(all(f, u) for u in VA.u)

# conversion tools
vecarr_to_vectors(VA::AbstractVectorOfArray) = [VA[i, :] for i in eachindex(VA[1])]
vecarr_to_vectors(VA::AbstractVectorOfArray) = [VA[i, :] for i in eachindex(VA.u[1])]
Base.vec(VA::AbstractVectorOfArray) = vec(convert(Array, VA)) # Allocates
# stack non-ragged arrays to convert them
function Base.convert(::Type{Array}, VA::AbstractVectorOfArray)
Expand Down

0 comments on commit f71ee39

Please sign in to comment.