So say I have this 2d numpy array:
(
[
[1,2,3,4],
[5,6,7,8],
[9,8,7,6],
[5,4,3,2]
]
);
I'd like to sub-sample this and get 2 by 2 like this (indexing every other row and every other column):
(
[
[1,3],
[9,7]
]
)
Is there a way to do this without any loops?
Thank you!