Skip to content

Commit

Permalink
Only replace the fill_value in the returned connectivity if it's diff…
Browse files Browse the repository at this point in the history
…erent from the internal FILL_VALUE
  • Loading branch information
Huite committed Sep 6, 2024
1 parent 125a0c8 commit ee87753
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xugrid/ugrid/ugridbase.py
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,8 @@ def _prepare_connectivity(

def _set_fillvalue(self, connectivity: IntArray) -> IntArray:
c = connectivity.copy()
c[c == FILL_VALUE] = self.fill_value
if self.fill_value != FILL_VALUE:
c[c == FILL_VALUE] = self.fill_value
return c

def _precheck(self, multi_index):
Expand Down

0 comments on commit ee87753

Please sign in to comment.