From 373a5293df29c060040e71ecc39e6665af463df5 Mon Sep 17 00:00:00 2001 From: Killer3048 Date: Wed, 9 Apr 2025 13:21:04 +0700 Subject: [PATCH] change line for smoother_arr --- src/timesfm/timesfm_base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/timesfm/timesfm_base.py b/src/timesfm/timesfm_base.py index 4502d21..b0a622a 100644 --- a/src/timesfm/timesfm_base.py +++ b/src/timesfm/timesfm_base.py @@ -45,7 +45,8 @@ def moving_average(arr, window_size): """Calculates the moving average using NumPy's convolution function.""" # Pad with zeros to handle initial window positions arr_padded = np.pad(arr, (window_size - 1, 0), "constant") - smoothed_arr = (np.convolve(arr_padded, np.ones(window_size), "valid") / window_size) + smoothed_arr = (np.convolve(arr_padded, np.ones(window_size), "valid") / + window_size) return [smoothed_arr, arr - smoothed_arr]