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 參考連接python http://www.jav
相關文章
相關標籤/搜索