Skip to content

Commit

Permalink
_get_dask -> to_dask_array
Browse files Browse the repository at this point in the history
  • Loading branch information
davidhassell committed Apr 29, 2022
1 parent d064ca5 commit c2181a0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cf/data/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ def __bool__(self):
"elements is ambiguous. Use d.any() or d.all()"
)

return bool(self._get_dask())
return bool(self.to_dask_array())

def __repr__(self):
"""Called by the `repr` built-in function.
Expand Down Expand Up @@ -5665,7 +5665,7 @@ def all(self, axis=None, keepdims=True, split_every=None):
"""
d = self.copy(array=False)
dx = self._get_dask()
dx = self.to_dask_array()
dx = da.all(dx, axis=axis, keepdims=keepdims, split_every=split_every)
d._set_dask(dx, reset_mask_hardness=False)
d.hardmask = _DEFAULT_HARDMASK
Expand Down Expand Up @@ -5782,7 +5782,7 @@ def any(self, axis=None, keepdims=True, split_every=None):
"""
d = self.copy(array=False)
dx = self._get_dask()
dx = self.to_dask_array()
dx = da.any(dx, axis=axis, keepdims=keepdims, split_every=split_every)
d._set_dask(dx, reset_mask_hardness=False)
d.hardmask = _DEFAULT_HARDMASK
Expand Down

0 comments on commit c2181a0

Please sign in to comment.