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

Function getter_inline

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

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

Callers

nothing calls this directly

Calls 1

getterFunction · 0.85

Tested by

no test coverage detected