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

Method __len__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

sumFunction · 0.90
anyMethod · 0.45

Tested by

no test coverage detected