Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
@ndmovingexp([(float32[:], float32, float32[:]), (float64[:], float64, float64[:])])
def move_exp_nanmean(a, alpha, out):
N = len(a)
if N == 0:
return
old_wt_factor = 1.0 - alpha
new_wt = 1.0
ignore_na = False # could add as option in the future
weighted_avg = a[0]
is_observation = not np.isnan(weighted_avg)
nobs = int(is_observation)
out[0] = weighted_avg
old_wt = 1.0