MCPcopy Index your code
hub / github.com/dask/dask / __len__

Method __len__

dask/array/_array_expr/_expr.py:66–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

64 return self._name
65
66 def __len__(self):
67 if not self.chunks:
68 raise TypeError("len() of unsized object")
69 if np.isnan(self.chunks[0]).any():
70 msg = (
71 "Cannot call len() on object with unknown chunk size."
72 f"{unknown_chunk_message}"
73 )
74 raise ValueError(msg)
75 return int(sum(self.chunks[0]))
76
77 @functools.cached_property
78 def _cached_keys(self):

Callers

nothing calls this directly

Calls 2

sumFunction · 0.50
anyMethod · 0.45

Tested by

no test coverage detected