[Numpy-discussion] swap elements in two arrays

Pauli Virtanen pav@iki...
Sun Feb 7 09:58:38 CST 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