From f7a54667ebb26c7f331954d250821fb1c702e028 Mon Sep 17 00:00:00 2001 From: BBing <67486385@qq.com> Date: Wed, 4 Oct 2023 12:47:44 +0800 Subject: [PATCH] Update timefeatures.py --- utils/timefeatures.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/timefeatures.py b/utils/timefeatures.py index 0c17fca..63f9bfa 100644 --- a/utils/timefeatures.py +++ b/utils/timefeatures.py @@ -55,7 +55,7 @@ class MonthOfYear(TimeFeature): class WeekOfYear(TimeFeature): """Week of year encoded as value between [-0.5, 0.5]""" - def __call__(self, index: pd.DatetimeIndex) -> np.ndarray: + def __call__(self, index: pd.DatetimeIndex) -> mnp.ndarray: return (index.week - 1) / 52.0 - 0.5 def time_features_from_frequency_str(freq_str: str) -> List[TimeFeature]: