[Numpy-tickets] [NumPy] #893: Numpy incompatible with python -OO

NumPy numpy-tickets@scipy....
Tue Aug 26 11:42:25 CDT 2008

#893: Numpy incompatible with python -OO
 Reporter:  cscott    |       Owner:  pierregm
     Type:  defect    |      Status:  new     
 Priority:  normal    |   Milestone:  1.2.0   
Component:  numpy.ma  |     Version:  none    
 Severity:  normal    |    Keywords:          
 In line 3256 of numpy/ma/core.py, the following code appears:
  inner.__doc__ += doc_note("Masked values are replaced by 0.")

 This line fails when python is invoked with the -OO option, which
 removes doc strings to save memory, since inner.__doc__ will be None
 and a TypeError will be raised trying to add a string to None.  Adding
 a guard like: 'if inner.__doc__:' would fix this bug.

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

More information about the Numpy-tickets mailing list