[Numpy-tickets] [NumPy] #698: segfault float96 + None

NumPy numpy-tickets@scipy....
Fri Mar 21 18:07:16 CDT 2008


#698: segfault float96 + None
------------------------+---------------------------------------------------
 Reporter:  gabriel     |        Owner:  stefan  
     Type:  defect      |       Status:  assigned
 Priority:  high        |    Milestone:          
Component:  numpy.core  |      Version:          
 Severity:  major       |   Resolution:          
 Keywords:  segfault    |  
------------------------+---------------------------------------------------
Comment (by oliphant):

 All of the numpy scalars implement their math by using the corresponding
 ufuncs.  The ufuncs for "object" arrays use the math defined by the
 corresponding objects.  This causes the recursion because adding to "None"
 upcasts everything to an object before attempting the ufunc calls. In the
 case of long doubles this creates an array of numpy long double scalars.
 As object arrays, the ufunc refers to the objects in the array to complete
 the math (which in this case calls back to the same ufunc which started
 it).

 The right fix to the cycle is to break it by either

 1) defining math separately for longdouble and clongdouble scalars or
 2) returning a different object for the getitem call of longdouble and
 clongdouble arrays.

 A quick fix would be to special-case somehow.

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


More information about the Numpy-tickets mailing list