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

Method __len__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

sumFunction · 0.90
anyMethod · 0.45

Tested by

no test coverage detected