I have a tensor X of size (T). What I need is to randomly sample N chunks from X of size t<T, so that the result is a tensor of size (N, t) and each “row” is originally contiguous in X. What is the best way to do that (without using for-loops, allocating memory when not needed, etc.)?