[Numpy-discussion] ufunc oddities

Nathan Bell wnbell@gmail....
Sat May 24 22:50:26 CDT 2008


On Sat, May 24, 2008 at 10:40 PM, Charles R Harris
<charlesr.harris@gmail.com> wrote:
>
> The question is consistency. A programmer should just have to remember a few
> simple rules, not a host of special cases. It makes things easier to learn
> and the code easier to understand because the intent is always made clear.
> Designing to whatever happens to be convenient at the moment leads to a mess
> and trying to document all the oddities is a PITA.
>

Sometimes "do what I expect" is better than rigid consistency.  I
would argue that avoiding common overflow cases is more important than
preserving the dtype when summing.

Anyway, the point is moot.  There's no way to change x.sum() without
breaking lots of code.

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


More information about the Numpy-discussion mailing list