I have a 2D numpy array and I want to create a new 1D array where it is indices of numbers in the first array if they are sorted in an ascending order. For the following array:
A = [[1,0,2],
[0,3,0]]
I want this to be like:
B = [[1,1],[0,2],[0,0],[0,1],[1,0],[1,2]]
Any idea how it can be done in python using predefined functions?
Thanks