[NumPy-Tickets] [NumPy] #2061: difference between behavior of assignment division and future division not documented

NumPy Trac numpy-tickets@scipy....
Tue Feb 21 11:53:34 CST 2012


#2061: difference between behavior of assignment division and future division not
documented
-------------------------------------------+--------------------------------
 Reporter:  AlanFrankel                    |       Owner:  pv         
     Type:  defect                         |      Status:  new        
 Priority:  normal                         |   Milestone:  Unscheduled
Component:  Documentation                  |     Version:  1.6.1      
 Keywords:  assignment division operators  |  
-------------------------------------------+--------------------------------
 I just ran into the same issue described in bug 1734 (assignment division
 not compatible with future division). Namely, I expected to see that the
 results of

 array_a /= scalar_s

 would depend on whether a "from __future__ import division" statement was
 included in the code. Eventually, I figured out this had no effect; the
 only way I could get true division, which I wanted, was to use:

 array_a = array_a / scalar_s

 I see that bug 1734 has been marked "won't fix". Whether or not I agree
 with that assessment, I definitely think that this behavior should be in
 user-accessible documentation (not just in the bug database). The
 "Mathematical Functions" page (
 http://docs.scipy.org/doc/numpy/reference/routines.math.html ) doesn't
 have any reference to the assignment operators at all (+=, -=, *=, /=),
 which in my opinion is a glaring omission, especially since it's hard to
 search for these strings via a punctuation-stripping search engine. The
 assignment operators should be listed (or there should be a link to them),
 and the fact that "/=" gives different results from "/" should be stated.

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


More information about the NumPy-Tickets mailing list