From cdb1920393dff5c7e25669bd66f9eeb6131eb280 Mon Sep 17 00:00:00 2001 From: Panu Lahtinen Date: Thu, 26 Oct 2023 10:56:20 +0300 Subject: [PATCH] Do not use DataArray as weight --- satpy/composites/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/satpy/composites/__init__.py b/satpy/composites/__init__.py index 8ed200df4c..62ac07aad8 100644 --- a/satpy/composites/__init__.py +++ b/satpy/composites/__init__.py @@ -792,7 +792,8 @@ def _weight_data(self, day_data, night_data, weights, attrs): if not self.include_alpha: fill = 1 if self.day_night == "night_only" else 0 weights = weights.where(~np.isnan(weights), fill) - + if isinstance(weights, xr.DataArray): + weights = weights.data data = [] for b in _get_band_names(day_data, night_data): # if self.day_night == "night_only" and self.include_alpha is False: