On 2-Mar-09, at 12:25 PM, Robert Kern wrote:

> a[[2,3,6], ...][..., [3,2]]
>
> You're doing fancy indexing, so there are copies both times.

D'oh!

So I guess the only way to avoid the second copy is to do what Jon  
initially suggested, i.e. a[ix_([2,3,6],range(a.shape[1]),[3,2])] ?

I suppose xrange would be better than arange() or range() as it  
wouldn't create and destroy the list all at once.

D
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://projects.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to