[Numpy-discussion] boolean arrays

Nadav Horesh nadavh@visionsense....
Thu Nov 26 10:26:19 CST 2009


It is obvious to me that True+False == True,. Why do you think it should
be False?

  Nadav

On Thu, 2009-11-26 at 14:20 +0100, Nils Wagner wrote:
> Hi all,
> 
> is the following behaviour correct
> 
> >>> a = array(([True,True],[True,True]))
> >>> b = array(([False,False],[False,False]))
> 
> >>> a+b
> array([[ True,  True],
>             [ True,  True]])
> 
> I have expected False.
> 
> Nils
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion


More information about the NumPy-Discussion mailing list