using RecursiveArrayTools
VA = VectorOfArray(A)
arr = convert(Array,VA)
VectorOfArray
is a lazy representation of the array of arrays as a higher order tensor (/matrix if A
is a vector of vectors). It uses the indexing fallback to do the conversion. Honestly, I tried writing my own loop for the conversion but the fallback was faster (Tim Holy Cartesian magic?) so this is what I’ve found to be the fastest, and I don’t know how to recreate it without using the lazy matrix indexing.