Transpose vector of vectors

Yes, I see similar results. That’s the difference between lazy (@cast) and eager (invert) operations.

I guess SplitApplyCombine could get a lazy invertview function if someone is interested and makes a PR. For now, there are splitdimsview + combinedimsview:

julia> splitdimsview(combinedimsview(xss), 1) == invert(xss)
true

julia> @btime splitdimsview(combinedimsview($xss), 1)
1.695 ns (0 allocations: 0 bytes)

Another 20000 times faster than @cast (:

4 Likes