(self)
| 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", ()) |