numpy has .r_
which
Translates slice objects to concatenation along the first axis.
This is a simple way to build up arrays quickly. There are two use cases.
If the index expression contains comma separated arrays, then stack them along their first axis.
If the index expression contains slice notation or scalars then create a 1-D array with a range indicated by the slice notation.
I am looking for a torch equivalent, originally to answer to a comment here, but also in general.