[Numpy-discussion] lexsort (original) (raw)
Tom Denniston tom.denniston at alum.dartmouth.org
Thu Jun 1 13:27:54 EDT 2006
- Previous message (by thread): [Numpy-discussion] Any Numeric or numarray users on this list?
- Next message (by thread): [Numpy-discussion] lexsort
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
This function is really useful but it seems to only take tuples not ndarrays. This seems kinda strange. Does one have to convert the ndarray into a tuple to use it? This seems extremely inefficient. Is there an efficient way to argsort a 2d array based upon multiple columns if lexsort is not the correct way to do this? The only way I have found to do this is to construct a list of tuples and sort them using python's list sort. This is inefficient and convoluted so I was hoping lexsort would provide a simple solution.
--Tom
- Previous message (by thread): [Numpy-discussion] Any Numeric or numarray users on this list?
- Next message (by thread): [Numpy-discussion] lexsort
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]