Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/lazyprogrammer/machine_learning_examples
/ smooth
Function
smooth
rl2/a3c/main.py:41–48 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
39
40
41
def
smooth(x):
42
# last 100
43
n = len(x)
44
y = np.zeros(n)
45
for
i in range(n):
46
start = max(0, i - 99)
47
y[i] = float(x[start:(i+1)].sum()) / (i - start + 1)
48
return
y
49
50
51
# Set the number of workers
Callers
1
main.py
File · 0.70
Calls
no outgoing calls
Tested by
no test coverage detected