[Numpy-discussion] Boolean indexing

Sturla Molden sturla at molden.no
Tue Mar 8 09:29:07 EST 2011


Den 08.03.2011 14:59, skrev Sam Tygier:
> I think the boolean slicing is making a copy instead of a view.

Yes.

> is there
> a way around this?

A "boolean slice" cannot be indexed with the dot product of dimensions 
and strides, hence the copy.

You probably want to use masked arrays instead.

Sturla




More information about the NumPy-Discussion mailing list