[Numpy-tickets] [NumPy] #757: numpy.sort sometimes doesn't handle strings right

NumPy numpy-tickets@scipy....
Fri Apr 25 02:11:26 CDT 2008


#757: numpy.sort sometimes doesn't handle strings right
--------------------+-------------------------------------------------------
 Reporter:  jloper  |       Owner:  somebody
     Type:  defect  |      Status:  new     
 Priority:  normal  |   Milestone:          
Component:  Other   |     Version:  devel   
 Severity:  normal  |    Keywords:          
--------------------+-------------------------------------------------------
 - numpy.sort(numpy.array(['\x01\x00\x02','\x01\x00\x04','\x01\x00\x02']))

 array(['\x01\x00\x02', '\x01\x00\x04', '\x01\x00\x02'], dtype='|S3')

 - '\x01\x00\x02'<'\x01\x00\x04'

 True

 - '\x01\x00\x02'>'\x01\x00\x04'
 False

 ... important because people are using a.view('S8') to run unique() across
 rows...

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


More information about the Numpy-tickets mailing list