Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

numpy moving 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 #moving #average
ADD COMMENT
Topic
Name
7+8 =