From a3672cc020cb718942fc4ec26261f192ca6dfcb0 Mon Sep 17 00:00:00 2001
From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu>
Date: Tue, 26 Oct 2021 15:31:31 +0200
Subject: [PATCH] Implemented generic computation of anomalies on arbitrary
 time-scale.

---
 climax/core/dataset.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/climax/core/dataset.py b/climax/core/dataset.py
index 71246d2..83b4dc8 100644
--- a/climax/core/dataset.py
+++ b/climax/core/dataset.py
@@ -237,7 +237,7 @@ class EoDataset(torch.utils.data.Dataset):
     def anomalies(ds, timescale='time.dayofyear', standard=False):
         # group dataset by time scale
         LOGGER.info('Computing anomalies ...')
-        groups = ds.groupby('time.dayofyear').groups
+        groups = ds.groupby(timescale).groups
 
         # compute anomalies over time
         anomalies = {}
-- 
GitLab