0

I have an array like this:

import numpy as np
array=np.array([[3,2,1,17],[1,2,1,25],[1,2,2,-1],[1,1,5,105]])

[[  3   2   1  17]
 [  1   2   1  25]
 [  1   2   2  -1]
 [  1   1   5 105]]

I want to sort it so that it looks like this:

[[1 1 5 105]
 [1 2 1 25]
 [1 2 2 -1]
 [3 2 1 17]]

So basically I want to sort the order of the rows based on the first three values in each of them. Can someone point me in the right direction?

ATYslh
  • 73
  • 1
  • 7

0 Answers0