[NumPy-Tickets] [NumPy] #2066: np.searchsorted segfaults when input is a recarray

NumPy Trac numpy-tickets@scipy....
Thu Aug 30 19:28:52 CDT 2012


#2066: np.searchsorted segfaults when input is a recarray
--------------------------------------------------------+-------------------
 Reporter:  josh.ayers                                  |       Owner:  somebody
     Type:  defect                                      |      Status:  new     
 Priority:  high                                        |   Milestone:  1.7.0   
Component:  numpy.core                                  |     Version:  1.6.1   
 Keywords:  searchsorted, segfault, segmentation fault  |  
--------------------------------------------------------+-------------------

Comment(by ocertik):

 I am getting:
 {{{

 In [1]: import numpy as np

 In [2]: dtype = np.format_parser(['i4', 'i4'], [], [])

 In [3]: a = np.recarray((2, ), dtype)

 In [4]: np.searchsorted(a, 1)
 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 <ipython-input-4-c733016efef5> in <module>()
 ----> 1 np.searchsorted(a, 1)

 /home/ondrej/repos/numpy/py27/lib/python2.7/site-
 packages/numpy/core/fromnumeric.pyc in searchsorted(a, v, side, sorter)
     812     except AttributeError:
     813         return _wrapit(a, 'searchsorted', v, side, sorter)
 --> 814     return searchsorted(v, side, sorter)
     815
     816

 TypeError: invalid type promotion

 In [5]: np.__version__
 Out[5]: '1.8.0.dev-5c944b9'
 }}}

 Let's close this issue.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/2066#comment:6>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list