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

Method chunks

dask/array/_array_expr/random.py:900–920  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

898
899 @property
900 def chunks(self):
901 size = self.operand("size")
902 chunks = self.operand("chunks")
903
904 # shapes = list(
905 # {
906 # ar.shape
907 # for ar in chain(args, kwargs.values())
908 # if isinstance(ar, (Array, np.ndarray))
909 # }
910 # )
911 # if size is not None:
912 # shapes.append(size)
913 shapes = [size]
914 # broadcast to the final size(shape)
915 size = broadcast_shapes(*shapes)
916 return normalize_chunks(
917 chunks,
918 size, # ideally would use dtype here
919 dtype=self.kwargs.get("dtype", np.float64),
920 )
921
922 @cached_property
923 def _info(self):

Callers

nothing calls this directly

Calls 4

broadcast_shapesFunction · 0.90
normalize_chunksFunction · 0.90
operandMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected