[Numpy-discussion] boolean arrays

René Dudfield renesd@gmail....
Fri Nov 27 01:20:59 CST 2009


On Thu, Nov 26, 2009 at 7:35 PM, Nils Wagner
<nwagner@iam.uni-stuttgart.de> wrote:
>
>
> Sorry, I mixed up '+' and '&'
>
>>>> a = array(([True,True],[True,True]))
>>>> b = array(([False,False],[False,False]))
>>>> a & b
> array([[False, False],
>        [False, False]], dtype=bool)
>
> Cheers,
>
>              Nils


hey,

this is a classical problem with + (sometimes pronounced 'and') and &
(also pronounced 'and').  Happens to all of us sometimes.


cu,


More information about the NumPy-Discussion mailing list