import numpy as np
grid = np.array([[1, 2, 3], [4, 5, 6]]) print(grid)
[[1 2 3] [4 5 6]]
grid[1, 0]
4
grid[:, 2]
array([3, 6])
grid[1, 1:]
array([5, 6])