discountAverage¶
-
utils.
discountAverage
(data, discount)[source]¶ An accumulating mean
Parameters: Returns: results – The values from the moving average
Return type: ndArray of length data
Examples
>>> discountAverage([1, 2, 3, 4], 1) array([1. , 1.5, 2. , 2.5]) >>> discountAverage([1, 2, 3, 4], 0.25) array([1. , 1.8 , 2.71428571, 3.68235294])