[Numpy-discussion] swap elements in two arrays

Pauli Virtanen pav at iki.fi
Sun Feb 7 10:58:38 EST 2010


su, 2010-02-07 kello 10:39 -0500, Alan G Isaac kirjoitti:
[clip]
> I thought that if `to_swap` is a boolean array that `a[to_swap]`
> will always own its own data.  Can that fail?

Ok, I don't think it can fail, then. But it's a slightly dangerous idiom
nevertheless...

-- 
Pauli Virtanen






More information about the NumPy-Discussion mailing list