Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy rolling average

import numpy as np

def moving_average(x, w):
    return np.convolve(x, np.ones(w), 'valid') / w
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #numpy #rolling #average
ADD COMMENT
Topic
Name
5+4 =