Transforming an Array{Matrix{T, N}, M} to an Array{T, N+M}

That’s exactly what a function in SplitApplyCombine.jl does:

using SplitApplyCombine
combinedims(result)
# returns 3×3×2×3×4 Array{ComplexF64, 5}

Don’t want to allocate another array and prefer a view instead? It has combinedimsview() for this purpose.

5 Likes