https://stackoverflow.com/questions/2828059/sorting-arrays-in-numpy-by-column
I suppose this works: a[a[:,1].argsort()]
a[a[:,1].argsort()]