📜  numpy 移动平均线 - Python 代码示例

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

代码示例2
import numpy as np

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