Skip to content

Commit

Permalink
Pass coords to UxDataArray (#818)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ahijevyc and philipc2 authored Jun 25, 2024
1 parent 13462bd commit 778e05e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions uxarray/core/dataarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
)

0 comments on commit 778e05e

Please sign in to comment.