[Numpy-discussion] Binary ufuncs: minimum
Charles R Harris
Tue May 27 18:32:49 CDT 2008
On Tue, May 27, 2008 at 4:39 PM, Christopher Barker <Chris.Barker@noaa.gov>
> Travis E. Oliphant wrote:
> > Yes, it does make sense to me for abs to use an unsigned type for
> 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?
That one actually works if you view the result as signed ;) I guess it
depends on what guarantees we want to make, which is what this is all about.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion