Lexicographical sort for numarray

Edward C. Jones edcjones at comcast.net
Wed Apr 27 01:35:39 EDT 2005


Suppose arr is a two dimensional numarray array. Suppose we do the 
following:

def rowsort(arr):
     a = arr.tolist()
     a.sort()
     return numarray.array(a)

Can this sort be done efficiently in numarray? This function is called 
"rowsort" in MatLab.



More information about the Python-list mailing list