[Numpy-discussion] Binary ufuncs: minimum

Nathan Bell wnbell at gmail.com
Tue May 27 18:10:19 EDT 2008


On Tue, May 27, 2008 at 5:07 PM, Christopher Barker
<Chris.Barker at noaa.gov> wrote:
>
> Sure, it could be fixed in this case by promoting to a larger type, but
> it's going to fail at the largest integer anyway, and I don't think any
> expects abs() to return a new type.
>

I think he was advocating using the corresponding unsigned type, not a
larger type.

e.g.
abs(int8) -> uint8
abs(int64) -> uint64

-- 
Nathan Bell wnbell at gmail.com
http://graphics.cs.uiuc.edu/~wnbell/



More information about the NumPy-Discussion mailing list