I have a tensor T with size (m, n) and I would like to concatenate any two rows. For example:
T = [[0,1],
[2,3],
[4,5]]
concat = [[0,1,2,3], [0,1,4,5], [2,3,0,1], [2,3,4,5], [4,5,0,1], [4,5,2,3]]
Is there any function able to do this? The only way that I have found is to use two nested for loops. Thanks.