[Numpy-discussion] Fancy indexing with masks

Pauli Virtanen pav at iki.fi
Thu Sep 22 06:09:26 EDT 2011


Thu, 22 Sep 2011 08:12:12 +0200, Han Genuit wrote:
[clip]
> I also noticed that it does strange things when using a list:
> 
>>>> c[[True, False, True]]
> array([[3, 4, 5],
>        [0, 1, 2],
>        [3, 4, 5]])

It casts the list with booleans to an integer array. Probably shouldn't 
work like that...

	Pauli




More information about the NumPy-Discussion mailing list