MCPcopy
hub / github.com/dask/dask / __len__

Method __len__

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

sumFunction · 0.90
anyMethod · 0.45

Tested by

no test coverage detected