[NumPy-Tickets] [NumPy] #1734: assignment division not compatible with future division

NumPy Trac numpy-tickets@scipy....
Fri Feb 4 05:10:15 CST 2011


#1734: assignment division not compatible with future division
------------------------------+---------------------------------------------
 Reporter:  Daan              |       Owner:  somebody
     Type:  defect            |      Status:  new     
 Priority:  normal            |   Milestone:  1.5.2   
Component:  numpy.core        |     Version:  1.5.0   
 Keywords:  integer division  |  
------------------------------+---------------------------------------------
 {{{
 from __future__ import division
 from numpy import array
 a = array([1,2,3])
 a/=max(a)
 }}}

 gives a = array([0,0,1])

 while

 {{{
 from __future__ import division
 from numpy import array
 a = array([1,2,3])
 a = a/max(a)
 }}}

 gives a = array([.333, .667, 1.]) as it should.

 The assignment division should be identical to (division + assignment).

 Numpy version 1.5.1

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1734>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list