On Mon, Apr 28, 2014 at 10:36 AM, Neal Becker
I notice rint returns float. Shouldn't it return int?
AFAICT, rint() is the same as round(), except with slightly different rules
for the "halfway" case. So returning a float makes sense, as round() and
ceil() and floor() all do.
( though I've always thought those should return inegers, too... )
By the way, what IS the difference between rint and round?
In [37]: for val in [-2.5, -3.5, 2.5, 3.5]:
....: assert np.rint(val) == np.round(val)
....:
In [38]:
-CHB
--
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.go