less-is-more.py 文件源码

python
阅读 23 收藏 0 点赞 0 评论 0

项目:less-is-more 作者: rougier 项目源码 文件源码
def smooth1d(x, window_len):
    s = np.r_[2*x[0] - x[window_len:1:-1], x, 2*x[-1] - x[-1:-window_len:-1]]
    w = np.hanning(window_len)
    y = np.convolve(w/w.sum(), s, mode='same')
    return y[window_len-1:-window_len+1]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号