1>>> import numpy as np
2>>> a = np.zeros((2, 2))
3>>> a
4array([[ 0., 0.],
5 [ 0., 0.]])
6# In the following line 1 is the index before which to insert, 0 is the axis.
7>>> np.insert(a, 1, np.array((1, 1)), 0)
8array([[ 0., 0.],
9 [ 1., 1.],
10 [ 0., 0.]])
11>>> np.insert(a, 1, np.array((1, 1)), 1)
12array([[ 0., 1., 0.],
13 [ 0., 1., 0.]])