MCPcopy
hub / github.com/dask/dask / __bool__

Method __bool__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 1

computeMethod · 0.95

Tested by

no test coverage detected