[NumPy-Tickets] [NumPy] #2061: difference between behavior of assignment division and future division not documented
NumPy Trac
numpy-tickets@scipy....
Wed Feb 22 14:17:47 CST 2012
#2061: difference between behavior of assignment division and future division not
documented
----------------------------+-----------------------------------------------
Reporter: AlanFrankel | Owner: pv
Type: defect | Status: reopened
Priority: normal | Milestone: Unscheduled
Component: Documentation | Version: 1.6.1
Resolution: | Keywords: assignment division operators
----------------------------+-----------------------------------------------
Comment(by mwiebe):
With 'same_kind', there would be a slight difference, a consequence of how
the types work.
Python 2 has int / int -> int, so array(int) /= array(int) is ok.
Python 3 has int / int -> float, so array(int) /= array(int) is trying to
assign a float into an int array, and would raise an error.
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/2061#comment:6>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list