Hello,
I am searching around for a while, but still can not solve the problem I have at hand. Could somebody point me to the solution, or give an suggestion to this question?
I have a tensor,
A = [[row1],    B = [1, 2, 1]
[row2],
[row3]]
tensor B indicates which group does each row of A belong to, and showing the group number
Question:
How can I rearrange A, such that rows for the same group can be grouped together, like:
A_after_rearrange = [[row1]
[row3],
[row2]]