I have two 2-D arrays and I would like to concatenate them interleaving the columns
Initial arrays (with shape (3, 8) each):
array([[ 107, 115, 132, 138, 128, 117, 121,135],
[ 149, 152, 151, 143, 146, 149, 149,148],
[ 152, 142, 146 , 141, 143, 148, 149, 153]])
array([[ 25, 28, 28, 25, 23, 21, 20, 18],
[ 3, 3, 2, 2, 10, 12, 12, 1],
[ 1, 0, 2, 0, 0, 0, 0, 1]])
Result (with shape 6x8):
array([[ 107, 115, 132, 138, 128, 117, 121, 135],
[ 25, 28, 28, 25, 23, 21, 20, 18],
[ 149, 152, 151, 143, 146, 149, 149, 148],
[ 3, 3, 2, 2, 10, 12, 12, 13],
[ 152, 142, 146 , 141, 143, 148, 149, 153]
[ 1, 0, 2, 0, 0, 0, 0, 1]])
I know it should be possible to do it with a series of reshapes, but I couldn't figure out how!