[Numpy-discussion] Binary ufuncs: minimum
Christopher Barker
Chris.Barker at noaa.gov
Tue May 27 18:39:00 EDT 2008
Travis E. Oliphant wrote:
> Yes, it does make sense to me for abs to use an unsigned type for integers.
I'm not so sure. I know I wouldn't expect to get a different type back
with a call to abs(). Do we really want to change that expectation just
for the case of MIN_INT?
While everyone is going to want an unsigned value when calling abs(),
who knows if they might want to use negative numbers later? Like:
x = abs(x)
x *= -1
Now what do we get/want?
-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 at noaa.gov
More information about the NumPy-Discussion
mailing list