[Numpy-discussion] indexing question

Ernest Adrogué eadrogue at gmx.net
Sun Nov 21 14:37:01 EST 2010


Hi,

21/11/10 @ 11:28 (-0800), thus spake John Salvatier:
> yes use the symbol ':'
> 
> so you want
> 
> t[:,x,y]

I tried that, but it's not the same:

In [307]: t[[0,1],x,y]
Out[307]: array([1, 7])

In [308]: t[:,x,y]
Out[308]: 
array([[1, 3],
       [5, 7]])

No?

-- 
Ernest



More information about the NumPy-Discussion mailing list