From f1573cbec5ee39723390ab55724c864e73ad2ff5 Mon Sep 17 00:00:00 2001 From: Kristof Van Tricht Date: Wed, 21 Aug 2024 17:07:21 +0200 Subject: [PATCH] Put missing values to 0 --- presto/inference.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/presto/inference.py b/presto/inference.py index a1f1810..ae5d3f6 100644 --- a/presto/inference.py +++ b/presto/inference.py @@ -112,7 +112,7 @@ def _extract_eo_data(cls, inarr: xr.DataArray) -> Tuple[np.ndarray, np.ndarray]: ) idx_valid = values != cls._NODATAVALUE values = cls._preprocess_band_values(values, presto_band) - eo_data[:, :, BANDS.index(presto_band)] = values + eo_data[:, :, BANDS.index(presto_band)] = values * idx_valid mask[:, :, IDX_TO_BAND_GROUPS[presto_band]] += ~idx_valid else: logger.warning(f"Band {org_band} not found in input data.")