def moving_avg_conv(a, length):
    """
    From ``bruges``

    Moving average via convolution. Seems slower than naive.
    """
    boxcar = np.ones(length)/length
    return np.convolve(a, boxcar, mode="same")
def moving_avg_conv ( a , length ) : boxcar = np . ones ( length ) / length return np . convolve ( a , boxcar , mode = "same" )
From ``bruges``

    Moving average via convolution. Seems slower than naive.