diff --git a/Project.toml b/Project.toml index f82b2edd..c5e37b15 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "RecursiveArrayTools" uuid = "731186ca-8d62-57ce-b412-fbd966d074cd" authors = ["Chris Rackauckas "] -version = "3.6.2" +version = "3.7.0" [deps] Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e" diff --git a/src/vector_of_array.jl b/src/vector_of_array.jl index b4f6f2e7..c563ce61 100644 --- a/src/vector_of_array.jl +++ b/src/vector_of_array.jl @@ -11,7 +11,7 @@ act like it's a higher-dimensional vector, and easily convert it to different fo structure is: ```julia -A[i] # Returns the ith array in the vector of arrays +A.u[i] # Returns the ith array in the vector of arrays A[j, i] # Returns the jth component in the ith array A[j1, ..., jN, i] # Returns the (j1,...,jN) component of the ith array ``` @@ -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)