Integer exponentiation fails (i.e., changes type) with boolean dtype. See below. Expected?
Alan Isaac
>>> a = np.array([[0,1,0],[0,0,1],[1,0,0]], dtype=np.bool_)
>>> a2 = a*a
>>> a3 = a2*a
>>> print(a3)
[[False True False]
[False False True]
[ True False False]]
>>> print(a**3)
[[0 1 0]
[0 0 1]
[1 0 0]]
_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion
