I have this np array:
array([[0, 0, 0, 0, 4, 4],
[2, 3, 5, 6, 5, 6]])
I want to sort it by the second row so the first row will adjust accordingly. So the output should be like this:
array([[0, 0, 0, 4, 0, 4],
[2, 3, 5, 5, 6, 6]])
Is there a quick way to do it?
- Didn't find the answer I was looking for here: Sorting arrays in NumPy by column