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

NumPy Trac numpy-tickets@scipy....
Wed Apr 11 19:17:59 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 charris):

 Raises TypeError in current master.


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

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

 In [3]: np.searchsorted(a, 1)
 ERROR: An unexpected error occurred while tokenizing input
 The following traceback may be corrupted or invalid
 The error message is: ('EOF in multi-line statement', (1615, 0))

 ---------------------------------------------------------------------------
 TypeError                                 Traceback (most recent call
 last)
 /home/charris/<ipython-input-3-c733016efef5> in <module>()
 ----> 1 np.searchsorted(a, 1)

 /home/charris/.local/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 [4]: np.__version__
 Out[4]: '1.7.0.dev-d50f961'

 }}}

 I think this is fixed I'm going to close the ticket unless someone can
 turn up a failure using the current devel version.

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


More information about the NumPy-Tickets mailing list