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

Method __len__

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

Source from the content-addressed store, hash-verified

1555 )
1556
1557 def __len__(self):
1558 if not self.chunks:
1559 raise TypeError("len() of unsized object")
1560 if np.isnan(self.chunks[0]).any():
1561 msg = (
1562 "Cannot call len() on object with unknown chunk size."
1563 f"{unknown_chunk_message}"
1564 )
1565 raise ValueError(msg)
1566 return int(sum(self.chunks[0]))
1567
1568 def __array_ufunc__(self, numpy_ufunc, method, *inputs, **kwargs):
1569 out = kwargs.get("out", ())

Callers

nothing calls this directly

Calls 2

sumFunction · 0.90
anyMethod · 0.45

Tested by

no test coverage detected