[Numpy-tickets] [NumPy] #540: Merge sort doesn't work correctly for string arrays.

NumPy numpy-tickets@scipy....
Wed Jun 27 14:44:53 CDT 2007


#540: Merge sort doesn't work correctly for string arrays.
------------------------+---------------------------------------------------
 Reporter:  charris     |       Owner:  somebody     
     Type:  defect      |      Status:  new          
 Priority:  normal      |   Milestone:  1.0.4 Release
Component:  numpy.core  |     Version:  none         
 Severity:  normal      |    Keywords:               
------------------------+---------------------------------------------------
 Merge sort doesn't do a stable sort on string arrays.


 {{{
 In [3]: charArr = numpy.array(['a','a','a','b','b','b','c','d'])

 In [12]: numpy.argsort(charArr, kind='m')
 Out[12]: array([2, 1, 0, 5, 4, 3, 6, 7])
 }}}

 The result should be array([0, 1, 2, 3, 4, 5, 6, 7])

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/540>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list