From 8b16b5132452cff3319be3f8124394b7ae708489 Mon Sep 17 00:00:00 2001
From: "Daniel.Frisinghelli" <daniel.frisinghelli@eurac.edu>
Date: Thu, 19 Aug 2021 11:48:33 +0200
Subject: [PATCH] Convert DEM to dask array.

---
 climax/core/dataset.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/climax/core/dataset.py b/climax/core/dataset.py
index 5e79106..b521bbe 100644
--- a/climax/core/dataset.py
+++ b/climax/core/dataset.py
@@ -142,7 +142,9 @@ class EoDataset(torch.utils.data.Dataset):
             alg='Horn').ReadAsArray().astype(np.float32)
 
         # read digital elevation model
-        dem = img2np(dem).astype(np.float32)
+        dem = da.asarray(img2np(dem).astype(np.float32))
+        slope = da.asarray(slope)
+        aspect = da.asarray(aspect)
 
         # digital elevation model features: elevation, slope and aspect
         dem_vars = {
-- 
GitLab