[Numpy-discussion] lexsort segfault sorting strings

eric eric at enthought.com
Thu Sep 28 07:05:21 CDT 2006

I've been using the new record arrays and lexsort from numpy quite a lot 
lately.  Very cool stuff.

Using the nightly egg for numpy from here (I believe it is up to date...):


I get segfaults when using lexsort on character arrays.  A lot of my 
columns in record arrays are string based, so sorting the arrays based 
on these columns would be really handy.

Here is an example that crashes for me.

Python 2.4.3 - Enthought Edition 1.0.0 (#69, Aug  2 2006, 12:09:59) [MSC 
v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
 >>> from numpy import lexsort
 >>> lst = [1,2,3]
 >>> lexsort((lst,))
array([0, 1, 2])
 >>> lst = ['abc','cde','fgh']
 >>> lexsort((lst,))

Do others see this?

I've opened a ticket at:


More information about the Numpy-discussion mailing list