There is also numpy.s_:

inds = np.s_[...,2,:]
z[inds]

(Though there are some problems with negative indices: see for example 
http://www.mail-archive.com/numpy-discussion@scipy.org/msg18245.html)

On 8 Aug 2009, at 10:02 PM, T J wrote:

> On Sat, Aug 8, 2009 at 8:54 PM, Neil Martinsen-Burrell<n...@wartburg.edu 
> > wrote:
>>
>> The ellipsis is a built-in python constant called Ellipsis.  The  
>> colon
>> is a slice object, again a python built-in, called with None as an
>> argument.  So, z[...,2,:] == z[Ellipsis,2,slice(None)].

_______________________________________________
NumPy-Discussion mailing list
NumPy-Discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to