[Numpy-discussion] ufunc oddities

Charles R Harris charlesr.harris at gmail.com
Sat May 24 23:12:38 EDT 2008


On Sat, May 24, 2008 at 9:06 PM, Robert Kern <robert.kern at gmail.com> wrote:

> On Sat, May 24, 2008 at 10:02 PM, Charles R Harris
> <charlesr.harris at gmail.com> wrote:
> > So what about the rule that the array type takes precedence over the
> scalar
> > type? That is broken for booleans.
>
> Yes, and if it wasn't an intentional special case (I don't recall
> discussing it on the list, but it might have been), then it's a bug
> and suitable for changing. The other behaviors are intentional and
> thus not suitable for changing.
>

So how do we know which is which? How does one write a test for an
unspecified behavior? And it is clear that add.reduce breaks the rules for
booleans. The result is that the boolean add function doesn't in fact *have*
a reduce method.

Chuck
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20080524/9633171e/attachment.html>


More information about the NumPy-Discussion mailing list