[Numpy-discussion] puzzle with boolean dtype

Charles R Harris charlesr.harris@gmail....
Wed Oct 6 16:52:32 CDT 2010

On Wed, Oct 6, 2010 at 3:10 PM, Alan G Isaac <alan.isaac@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?

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

More information about the NumPy-Discussion mailing list