Let's see an easy example, I have a tensor [1,2]. The position of 1 is [0], the position of 2 is [1]. I want to transform this 1d tensor into 2d, where the position of
1would turn from[0]to[0, 0]2would turn from[1]to[1, 1]to make the new tensor look like this:
[
[1, 0],
[0, 2],
]
Is there a method for that?