diff --git a/pytorch_forecasting/data/encoders.py b/pytorch_forecasting/data/encoders.py index d388260a..9845ca12 100644 --- a/pytorch_forecasting/data/encoders.py +++ b/pytorch_forecasting/data/encoders.py @@ -470,7 +470,7 @@ def _set_parameters( if isinstance(y_center, torch.Tensor): eps = torch.finfo(y_center.dtype).eps else: - eps = np.finfo(np.float).eps + eps = np.finfo(np.float32).eps if self.method == "identity": if isinstance(y_center, torch.Tensor): self.center_ = torch.zeros(y_center.size()[:-1]) @@ -785,7 +785,7 @@ def fit(self, y: pd.Series, X: pd.DataFrame): self """ y = self.preprocess(y) - eps = np.finfo(np.float).eps + eps = np.finfo(np.float32).eps if len(self.groups) == 0: assert not self.scale_by_group, "No groups are defined, i.e. `scale_by_group=[]`" if self.method == "standard":