If we have 2d arrays then we can do the follwoing
A = np.zeros((5,2))
B = np.ones((5,2))
row_a, col_a = np.shape(A)
row_b, col_b = np.shape(B)
Mix columns in alternating fashion
assert row_a == row_b, 'number of rows should be same'
np.ravel([A,B],order="F").reshape(row_a,col_a+col_b)
This will give
array([[0., 1., 0., 1.],
[0., 1., 0., 1.],
[0., 1., 0., 1.],
[0., 1., 0., 1.],
[0., 1., 0., 1.]])
To mix rows
assert col_a == col_b, 'number of cols should be same'
np.ravel([A,B],order="F").reshape(col_a,row_a+row_b).T
Which will give
array([[0., 0.],
[1., 1.],
[0., 0.],
[1., 1.],
[0., 0.],
[1., 1.],
[0., 0.],
[1., 1.],
[0., 0.],
[1., 1.]])