Builds tensor from rows of the input tensor.
tensor with rows corresponding to row by indices
the IntArray of 1-dimensional indices