Sorting array

Tartifola tartifola at gmail.com
Fri Nov 30 09:42:26 EST 2007



Hi,
I'm working with numerical array and I'm a little lost on a particular
sorting of one of them. In particular I have an array like

a = array([[8,4,1],[2,0,9]])

and I need to sort it using only the first column as reference but
keeping the lines together so to obtain

array([[2, 0, 9],
       [8, 4, 1]])

Any help?
Thanks



More information about the Python-list mailing list