📜  numpy 滚动平均值 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:31.844000             🧑  作者: Mango

代码示例2
import numpy as np

def moving_average(x, w):
    return np.convolve(x, np.ones(w), 'valid') / w