Assume we want to select all the elements in the tensor which are greater than 5. I know that the following code can do that:
B = A[A > 5]

But I want to know the indices of the selected elements. Is there any way to select and find the indices of the selected elements?
Thanks