I have a following 2D numpy array:
array([[1 0]
[2 0]
[4 0]
[1 1]
[2 1]
[3 1]
[4 2])
I want to sort the ID of first column with its value in second value, suck that I get back:
array([[1 0]
[1 1]
[2 0]
[2 1]
[3 1]
[4 0]
[4 2]])
I am getting O(n^2) complexity and want to improve it further.