Hi Dave. This does seem like the only way to write this nicely. Unfortunately, I think this may be wasteful memory wise (in contrast to what the obvious matlab code would do) as it constructs an array with the whole first index intact at first. I think I will use it anyways though as I find the other notations pretty awkward.
Jon. On Fri, Feb 27, 2009 at 11:54 PM, David Warde-Farley <[email protected]> wrote: > > On 27-Feb-09, at 3:35 PM, David Warde-Farley wrote: >> >> a[[2,3,6],:,:][:,:,[3,2]] should do what you want. > > Slightly more elegantly (I always forget about this syntax): > > a[[2,3,6], ...][..., [3,2]] > > David > _______________________________________________ > Numpy-discussion mailing list > [email protected] > http://projects.scipy.org/mailman/listinfo/numpy-discussion > _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
