stoiclion's picture
Agent Workbench tasks and environment at e59670df
b5d1dbc verified
Raw History Blame Contribute Delete
258 Bytes
def rolling_mean(values, window):
"""Mean of each full window of `window` consecutive values, in order."""
out = []
for i in range(len(values) - window):
chunk = values[i:i + window]
out.append(sum(chunk) / window)
return out