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

NumPy numpy-tickets@scipy....
Sun Apr 27 06:26:45 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  |  
------------------------------------------+---------------------------------
Changes (by stefan):

  * status:  new => closed
  * resolution:  => wontfix

Comment:

 It does not "fail silently", it does what you're asking:

 {{{
 b += (0.1*a).astype(b.dtype)
 }}}

 In-place operations cannot change the dtype of b.

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


More information about the Numpy-tickets mailing list