Skip to content

Commit

Permalink
minor change: for consistency the mask is cast to DataArray after the…
Browse files Browse the repository at this point in the history
… if/else statement
  • Loading branch information
vadmbertr committed Dec 28, 2023
1 parent df0ed7a commit e66db2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clouddrift/ragged.py
Original file line number Diff line number Diff line change
Expand Up @@ -830,9 +830,9 @@ def _mask_var(
if len(var) == len(rowsize):
mask = criterion(var)
else:
mask = xr.DataArray(
data=apply_ragged(criterion, var, rowsize), dims=[dim_name]
).astype(bool)
mask = apply_ragged(criterion, var, rowsize)

mask = xr.DataArray(data=mask, dims=[dim_name]).astype(bool)

if not len(var) == len(mask):
raise ValueError(
Expand Down

0 comments on commit e66db2d

Please sign in to comment.