Suppose you have a 3D array:
arr = np.zeros((9,9,9))
a[2:7,2:7,2:7] = np.random.randint(5, size=(5,5,5))
How can you sort all occurring values in this array (not along an axis like with e.g. np.sort) and show all indices of those values?
Output should be something like:
0 at [0,0,0], [0,1,0], [0,2,1], ...etc.
1 at [5,5,5], [5,7,6], ...etc
2 at [4,5,5], ...etc
3 at ...etc
and so on