[Numpy-discussion] puzzle with boolean dtype

Charles R Harris charlesr.harris at gmail.com
Wed Oct 6 17:52:32 EDT 2010


On Wed, Oct 6, 2010 at 3:10 PM, Alan G Isaac <alan.isaac at gmail.com> wrote:

> Integer exponentiation fails (i.e., changes type)
> with boolean dtype.  See below. Expected?
>
>
Power isn't defined for booleans, I mean, who exponentiates booleans ;) What
would you want in it's place? For consistancy, a**0 == all_true, a**i == a,
i > 0?

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


More information about the NumPy-Discussion mailing list