[Numpy-discussion] Slicing/selection in multiple dimensions simultaneously

David Warde-Farley dwf@cs.toronto....
Fri Feb 27 22:54:42 CST 2009


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


More information about the Numpy-discussion mailing list