[Numpy-discussion] stable sort for structured dtypes?

Benjamin Root ben.root at ou.edu
Fri May 11 11:01:50 EDT 2012

Hello all,

I need to sort a structured array in a stable manner.  I am also sorting
only by one of the keys, so I don't think lexsort() is stable in that
respect.  np.sort() allows for choosing 'mergesort', but it appears to not
be implemented for structured arrays.  Am I going to have to create a new
plain array out of the one column I want to sort by, and run np.artsort()
with the mergesort in order to get around this?  Or is there something more
straightforward that I am missing?

Ben Root
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20120511/a8e84855/attachment.html>

More information about the NumPy-Discussion mailing list