MCPcopy Create free account
hub / github.com/dask/dask / __bool__

Method __bool__

dask/array/core.py:1881–1888  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1879 return to_backend(self, backend=backend, **kwargs)
1880
1881 def __bool__(self):
1882 if self.size > 1:
1883 raise ValueError(
1884 f"The truth value of a {self.__class__.__name__} is ambiguous. "
1885 "Use a.any() or a.all()."
1886 )
1887 else:
1888 return bool(self.compute())
1889
1890 __nonzero__ = __bool__ # python 2
1891

Callers

nothing calls this directly

Calls 1

computeMethod · 0.95

Tested by

no test coverage detected