From 778e05e27af90a27e4ea81d84e137a33b6064a7a Mon Sep 17 00:00:00 2001 From: David Ahijevych Date: Tue, 25 Jun 2024 13:44:20 -0600 Subject: [PATCH] Pass coords to UxDataArray (#818) in core/dataarray.py Otherwise, _slice_from_grid loses coordinate labels (the index values). Co-authored-by: Philip Chmielowiec <67855069+philipc2@users.noreply.github.com> --- uxarray/core/dataarray.py | 1 + 1 file changed, 1 insertion(+) diff --git a/uxarray/core/dataarray.py b/uxarray/core/dataarray.py index a264abdfd..a99defd16 100644 --- a/uxarray/core/dataarray.py +++ b/uxarray/core/dataarray.py @@ -1093,6 +1093,7 @@ def _slice_from_grid(self, sliced_grid): uxgrid=sliced_grid, data=d_var, name=self.name, + coords=self.coords, dims=self.dims, attrs=self.attrs, )