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

Method _layer

dask/array/_array_expr/_creation.py:101–118  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

99 return float(range_) / div
100
101 def _layer(self) -> dict:
102 dsk = {}
103 blockstart = self.start
104 func = partial(_linspace, endpoint=self.endpoint, dtype=self.dtype)
105
106 for i, bs in enumerate(self.chunks[0]):
107 bs_space = bs - 1 if self.endpoint else bs
108 blockstop = blockstart + (bs_space * self.step)
109 task = Task(
110 (self._name, i),
111 func,
112 blockstart,
113 blockstop,
114 bs,
115 )
116 blockstart = blockstart + (self.step * bs)
117 dsk[task.key] = task
118 return dsk
119
120
121class BroadcastTrick(ArrayExpr):

Callers

nothing calls this directly

Calls 1

TaskClass · 0.90

Tested by

no test coverage detected