[Numpy-discussion] What type should / return in python 3k when applied to two integer types?
Christopher Barker
Chris.Barker@noaa....
Thu Aug 27 17:13:30 CDT 2009
Charles R Harris wrote:
> I also intend to make it work with
>
> from future import division
doesn't already?
In [3]: from __future__ import division
In [5]: 3 / 4
Out[5]: 0.75
In [6]: import numpy as np
In [7]: np.array(3) / np.array(4)
Out[7]: 0.75
In [8]: np.array(3) // np.array(4)
Out[8]: 0
> I've also considered making that import the default for numpy
I'd like that, but it is a bit radical --
-Chris
--
Christopher Barker, Ph.D.
Oceanographer
Emergency Response Division
NOAA/NOS/OR&R (206) 526-6959 voice
7600 Sand Point Way NE (206) 526-6329 fax
Seattle, WA 98115 (206) 526-6317 main reception
Chris.Barker@noaa.gov
More information about the NumPy-Discussion
mailing list