![](https://secure.gravatar.com/avatar/39916bae984cb93b797efd2b175f59c0.jpg?s=120&d=mm&r=g)
7 Jul
2007
7 Jul
'07
12:02 p.m.
On Sat, 7 Jul 2007, Charles R Harris apparently wrote:
In [60]: a Out[60]: array([ True, True, True, True], dtype=bool) In [61]: a + a Out[61]: array([ True, True, True, True], dtype=bool)
Yea! Behaves like a boolean array. And for multiplication to. And in boolean matrices, powers work right. (I use this.)
In [62]: a + 1 Out[62]: array([2, 2, 2, 2])
Yea! Coercion to int, as expected.
In [66]: True + True Out[66]: 2
Boo! Hopefully Python will "fix" this one day. Cheers, Alan Isaac