diff --git a/sinergym/utils/wrappers.py b/sinergym/utils/wrappers.py index 96a5311b9e..e747d9fa96 100644 --- a/sinergym/utils/wrappers.py +++ b/sinergym/utils/wrappers.py @@ -405,8 +405,8 @@ def observation(self, obs: np.ndarray) -> np.ndarray: new_obs['is_weekend'] = 1.0 if dt.isoweekday() in [6, 7] else 0.0 new_obs['hour_cos'] = np.cos(2 * np.pi * obs_dict['hour'] / 24) new_obs['hour_sin'] = np.sin(2 * np.pi * obs_dict['hour'] / 24) - new_obs['month_cos'] = np.cos(2 * np.pi * obs_dict['month'] / 12) - new_obs['month_sin'] = np.sin(2 * np.pi * obs_dict['month'] / 12) + new_obs['month_cos'] = np.cos(2 * np.pi * (obs_dict['month'] - 1) / 12) + new_obs['month_sin'] = np.sin(2 * np.pi * (obs_dict['month'] - 1) / 12) return np.array(list(new_obs.values()))