[NumPy-Tickets] [NumPy] #2189: segfault on searchsorted of wrong dtype in structured array

NumPy Trac numpy-tickets@scipy....
Thu Aug 30 21:38:31 CDT 2012


#2189: segfault on searchsorted of wrong dtype in structured array
------------------------+---------------------------------------------------
 Reporter:  akhmerov    |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:  1.7.0   
Component:  numpy.core  |     Version:  1.6.1   
 Keywords:              |  
------------------------+---------------------------------------------------

Comment(by ocertik):

 This now gives:
 {{{
 (py27)ondrej@hawk:~/repos/numpy/tools(fix369)$ python -c "import numpy as
 np; a = np.array([('a', 1)], dtype='S1, int'); np.searchsorted(a, 1.2)"
 Traceback (most recent call last):
   File "<string>", line 1, in <module>
   File "/home/ondrej/repos/numpy/py27/lib/python2.7/site-
 packages/numpy/core/fromnumeric.py", line 814, in searchsorted
     return searchsorted(v, side, sorter)
 TypeError: invalid type promotion
 }}}
 I am now working on a test and I'll submit a PR soon.

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


More information about the NumPy-Tickets mailing list