import pandas as pd
= np.random.rand(10)
y = pd.Series(y)
ys = random.random()
alpha
assert np.allclose(ewm_mean(y, alpha), ys.ewm(alpha=alpha, adjust=False).mean().values)
EWM
Exponentially weighted functions
ewm_mean
ewm_mean (input_array:numpy.ndarray, alpha:float)