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

Method __bool__

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

Source from the content-addressed store, hash-verified

1870 return to_backend(self, backend=backend, **kwargs)
1871
1872 def __bool__(self):
1873 if self.size > 1:
1874 raise ValueError(
1875 f"The truth value of a {self.__class__.__name__} is ambiguous. "
1876 "Use a.any() or a.all()."
1877 )
1878 else:
1879 return bool(self.compute())
1880
1881 __nonzero__ = __bool__ # python 2
1882

Callers

nothing calls this directly

Calls 1

computeMethod · 0.95

Tested by

no test coverage detected