EWM

Exponentially weighted functions

source

ewm_mean

 ewm_mean (input_array:numpy.ndarray, alpha:float)
import pandas as pd

y = np.random.rand(10)
ys = pd.Series(y)
alpha = random.random()

assert np.allclose(ewm_mean(y, alpha), ys.ewm(alpha=alpha, adjust=False).mean().values)