mirror of
https://github.com/wassname/pytorch-ts.git
synced 2026-07-24 13:20:07 +08:00
fix pandas dep. warning and version
This commit is contained in:
@@ -112,9 +112,9 @@ class WeekOfYear(TimeFeature):
|
||||
|
||||
def __call__(self, index: pd.DatetimeIndex) -> np.ndarray:
|
||||
if self.normalized:
|
||||
return index.weekofyear / 51.0 - 0.5
|
||||
return pd.Int64Index(index.isocalendar().week) / 51.0 - 0.5
|
||||
else:
|
||||
return index.weekofyear.map(float)
|
||||
return pd.Int64Index(index.isocalendar().week).map(float)
|
||||
|
||||
|
||||
class FourierDateFeatures(TimeFeature):
|
||||
|
||||
Reference in New Issue
Block a user