A julia function to stack two arrays of size (m, n), to get one of size (2, m, n)

Your function is like one order of magnitude faster.

LazyStack would be faster for the lazy view stack(a,b) which has dimensions 4x3x2. It is PermutedDimsArray() that screws it up to get 2x4x3. Maybe there is another way to reinterpret this.

1 Like