[Numpy-tickets] [NumPy] #298: lexsort segfault sorting strings

NumPy numpy-tickets at scipy.net
Thu Sep 28 07:04:55 CDT 2006


#298: lexsort segfault sorting strings
------------------------+---------------------------------------------------
 Reporter:  ericjones   |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:          
Component:  numpy.core  |     Version:          
 Severity:  major       |    Keywords:          
------------------------+---------------------------------------------------
 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...):

 http://code.enthought.com/enstaller/eggs/numpy-nightly-py2.4-win32.egg


 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.

 C:\wrk\mt\trunk\src\lib\mt\statement\tests>python
 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,))
 <seg-fault>

 thanks,
 eric

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


More information about the Numpy-tickets mailing list