a = np.zeros((10, 10)) a[5, :] = 5 a[6, :] = 6 k = np.zeros((3,3)) k[1,1] = 1 k[0,1] = -1 a