[Numpy-tickets] [NumPy] #761: operator += fails silently when adding arrays with diffenent base types

NumPy numpy-tickets@scipy....
Sun Apr 27 20:53:15 CDT 2008


#761: operator += fails silently when adding arrays with diffenent base types
------------------------------------------+---------------------------------
 Reporter:  drevicko                      |        Owner:  somebody
     Type:  defect                        |       Status:  closed  
 Priority:  normal                        |    Milestone:  1.2     
Component:  numpy.numarray                |      Version:  none    
 Severity:  normal                        |   Resolution:  wontfix 
 Keywords:  upcast upcasting += operator  |  
------------------------------------------+---------------------------------
Comment (by drevicko):

 Thankyou for the explanation. That makes more sense.

 I noticed, however, that if a and b are integers,
 {{{
 b += 0.1*a
 }}}
 results in the type of b changed to float.

 Is it worth considering this behaviour for matrices too? I'm thinking that
 at this stage, there may be lots of code out there that would break if
 things changed, so probably not...

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


More information about the Numpy-tickets mailing list