MCPcopy
hub / github.com/dask/dask / getter_inline

Function getter_inline

dask/array/core.py:156–175  ·  view source on GitHub ↗

A getter function that optimizations feel comfortable inlining Slicing operations with this function may be inlined into a graph, such as in the following rewrite **Before** >>> a = x[:10] # doctest: +SKIP >>> b = a + 1 # doctest: +SKIP >>> c = a * 2 # doctest: +SKIP

(a, b, asarray=True, lock=None)

Source from the content-addressed store, hash-verified

154
155
156def getter_inline(a, b, asarray=True, lock=None):
157 """A getter function that optimizations feel comfortable inlining
158
159 Slicing operations with this function may be inlined into a graph, such as
160 in the following rewrite
161
162 **Before**
163
164 >>> a = x[:10] # doctest: +SKIP
165 >>> b = a + 1 # doctest: +SKIP
166 >>> c = a * 2 # doctest: +SKIP
167
168 **After**
169
170 >>> b = x[:10] + 1 # doctest: +SKIP
171 >>> c = x[:10] * 2 # doctest: +SKIP
172
173 This inlining can be relevant to operations when running off of disk.
174 """
175 return getter(a, b, asarray=asarray, lock=lock)
176
177
178from dask.array.optimization import fuse_slice, optimize

Callers

nothing calls this directly

Calls 1

getterFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…