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

Method __repr__

dask/array/core.py:1611–1629  ·  view source on GitHub ↗

>>> import dask.array as da >>> da.ones((10, 10), chunks=(5, 5), dtype='i4') dask.array<..., shape=(10, 10), dtype=int32, chunksize=(5, 5), chunktype=numpy.ndarray>

(self)

Source from the content-addressed store, hash-verified

1609 return NotImplemented
1610
1611 def __repr__(self):
1612 """
1613
1614 >>> import dask.array as da
1615 >>> da.ones((10, 10), chunks=(5, 5), dtype='i4')
1616 dask.array<..., shape=(10, 10), dtype=int32, chunksize=(5, 5), chunktype=numpy.ndarray>
1617 """
1618 chunksize = str(self.chunksize)
1619 name = self.name.rsplit("-", 1)[0]
1620 return (
1621 "dask.array<{}, shape={}, dtype={}, chunksize={}, chunktype={}.{}>".format(
1622 name,
1623 self.shape,
1624 self.dtype,
1625 chunksize,
1626 type(self._meta).__module__.split(".")[0],
1627 type(self._meta).__name__,
1628 )
1629 )
1630
1631 def _repr_html_(self):
1632 if ARRAY_TEMPLATE is None:

Callers

nothing calls this directly

Calls 2

rsplitMethod · 0.80
splitMethod · 0.80

Tested by

no test coverage detected