[Numpy-discussion] ufunc oddities
Charles R Harris
Sat May 24 23:00:49 CDT 2008
On Sat, May 24, 2008 at 9:50 PM, Nathan Bell <email@example.com> wrote:
> On Sat, May 24, 2008 at 10:40 PM, Charles R Harris
> <firstname.lastname@example.org> wrote:
> > The question is consistency. A programmer should just have to remember a
> > simple rules, not a host of special cases. It makes things easier to
> > and the code easier to understand because the intent is always made
> > Designing to whatever happens to be convenient at the moment leads to a
> > 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.
Certainly, and the change to the default accumulator was made to avoid the
common expectation of no wraparound. But it is time to document these things
and write tests, and the tests will engrave the current behavior in stone.
Which is why we need to be sure that the current behavior is in fact correct
and not an overlooked booboo.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion