[Numpy-discussion] ufunc oddities

Nathan Bell wnbell@gmail....
Sat May 24 22:35:18 CDT 2008


On Sat, May 24, 2008 at 10:24 PM, Charles R Harris
<charlesr.harris@gmail.com> wrote:
>
>
> Shouldn't that be the other way round? If you want integers, do
> x.sum(dtype=int). Ints don't sum in float64 by default.
>

The default behavior (x.sum() -> int) is more useful than (x.sum() ->
bool) since x.any() already exists.

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


More information about the Numpy-discussion mailing list