I need to calculate a moving average over a 3D array with a step size set by me. What I am doing right now is
img = np.ones(10,10,50)
img_new = bottleneck.move.move_mean(img, window=5, axis=2)
While the bottleneck.move.move_mean is fast enough to deal with images, unfortunately it does not let me set the step size. This leads to a lot of overhead because the mean of 4 out 5 windows is calculated unnecessarily.
Is there a similar function to bottleneck.move.move_mean where I can set the step size?
step_sizein this context exactly?