I have a W x H array A1. There is another W x M array A2, where M << H. These M points along that dimension is supposed to be put in equal-spaced cells of the for all the W dimension. I've achieved this by
hopSize = H / M
A1[:, 0 : min(A1.shape[1], hopSize*M) : hopSize] = A2
Now I want to populate the value of the M anchor points to fill all the points between those anchors along the H dimension, e.g., Anchor 1's value will be copied to every point for A1[:, Anchor1 : Anchor2].
I wonder if there is a way to achieve this without using for-loop.