Now the sub-grid: rows 0 and 2 crossed with columns 3 and 0, shape (2, 2)

NumPy · from Fancy indexing

a[[0, 2]]a[rows, cols]np.ix_np.takenp.add.atalways copies

Putting the kettle on…

Starting up…

Exercise 4

Now the sub-grid: rows 0 and 2 crossed with columns 3 and 0, shape (2, 2).

your answer
stuck? the lesson behind it
Fancy indexing
Indexing with a list of positions — and why two lists zip instead of crossing.