>>224
a-bに対して[1/3, 1/3, 1/3]を畳み込めば良い
f = np.ones(3)/3
m = np.convolve(a-b, f, ‘same’)