numpy.convolve()函数计算移动平均值和卷积

tes = np.array([1,2,3])
weight = np.ones(2)#计算卷积  array([1., 3., 5., 3.])
# weight = weight*(1/2)#计算移动平均数  array([0.5, 1.5, 2.5, 1.5])
result = np.convolve(tes,weight)
result

numpy.convolve()函数计算移动平均值和卷积_第1张图片

参考链接

https://blog.csdn.net/u011599639/article/details/76254442

https://blog.csdn.net/qq_24330285/article/details/51594334 

https://blog.csdn.net/wkj3022073/article/details/45585837

你可能感兴趣的:(numpy)