smoothing.py 文件源码

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

项目:PySAT 作者: USGS-Astrogeology 项目源码 文件源码
def gaussian(y, window_size=3, sigma=2):
    """
    Apply a gaussian filter to smooth the input vector

    Parameters
    ==========
    y :  array
         The input array

    window_size : int
                  An odd integer describing the size of the filter.

    sigma : float
            The numver of standard deviation
    """
    filt = signal.gaussian(window_size, sigma)
    return Series(signal.convolve(y, filt, mode='same'), index=y.index)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号