[NumPy-Tickets] [NumPy] #2097: searchsorted(sorter=) test error

NumPy Trac numpy-tickets@scipy....
Wed Apr 4 16:01:39 CDT 2012


#2097: searchsorted(sorter=) test error
--------------------------+-------------------------------------------------
 Reporter:  rgommers      |       Owner:  charris
     Type:  defect        |      Status:  new    
 Priority:  normal        |   Milestone:  1.7.0  
Component:  numpy.core    |     Version:  1.6.1  
 Keywords:  searchsorted  |  
--------------------------+-------------------------------------------------

Comment(by charris):

 I'm pretty sure this is the problem:


 {{{
 if (PyLong_AsLong(min) < 0)
 }}}


 That is, the call to PyLong_AsLong, especially as PyLong isn't a C long.
 I'm not sure of the best way around this at the moment, since the value is
 returned from a call to the ndarray.min(). At the very least is should be
 PyLong_AsLongLong and it needs error checking. Probably the easiest fix
 here would be to directly determine the max/min values since they are
 contiguous npy_intp arrays. That would probably be faster in any case.

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


More information about the NumPy-Tickets mailing list