In [1]:
import numpy as np
nx,ny=6,4
X = np.random.randint(0,5,size=(nx,ny))
X
Out[1]:
In [2]:
X[:,slice(0,4,2)]
Out[2]:
In [3]:
stripe = (slice(None),slice(0,4,2))
In [4]:
X[stripe]
Out[4]:
In [ ]:
In [ ]:
In [ ]: