[Numpy-tickets] [NumPy] #746: Segfault calling logical_not on own object

NumPy numpy-tickets@scipy....
Sat Apr 19 18:47:42 CDT 2008


#746: Segfault calling logical_not on own object
------------------------+---------------------------------------------------
 Reporter:  charris     |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:  1.1.0   
Component:  numpy.core  |     Version:  none    
 Severity:  normal      |    Keywords:          
------------------------+---------------------------------------------------
 The following causes a segfault:


 {{{
         class foo :
             def logical_not(self) :
                 return np.bool_(1)
             def logical_and(self, obj) :
                 return np.bool_(1)

         # check unary PyUFunc_O_O_method
         msg = "PyUFunc_O_O_method"
         x = np.zeros(10, dtype=np.object)[0::2]
         x[...] = foo()
         assert np.all(np.logical_not(x) == True), msg

 }}}

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


More information about the Numpy-tickets mailing list