The interpolate_ma Module
- interpolate_ma(num_vec: array, k: int)[source]
Python implementation of the logic described in the function located at: https://github.com/SteffenMoritz/imputeTS/blob/master/R/na_ma.R
If all inputs are missing, we return only missing values
- get_indices(vec, index, k)[source]
Return a range object of the indices to be used to calculate a rolling mean If the window defined by
k
doesn’t contain at least 2 non-missing values, k is increased by one until the window has at least two non-missing values.