Creation of range along given dimension

You can use reshape(1:10, 1, 1, 1, 10, 1) for broadcasting, but depending on what you’re doing, there may be better options (plain loops, mapslices, JuliennedArrays, Tullio).

2 Likes