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

Function getter_inline

dask/array/core.py:157–176  ·  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

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

Callers

nothing calls this directly

Calls 1

getterFunction · 0.85

Tested by

no test coverage detected