Return column 2 of a but keep it 2-D — shape (3, 1), not (3,)

NumPy · from Indexing and slicing

a[i, j]start:stop:stepa[:, 1]negative indices...a[i][j]

Putting the kettle on…

Starting up…

Exercise 3

Return column 2 of a but keep it 2-D — shape (3, 1), not (3,).

your answer
stuck? the lesson behind it
Indexing and slicing
One range per axis — and why an integer removes an axis while a slice keeps it.