MCPcopy Index your code
hub / github.com/dask/dask / overlap_internal

Function overlap_internal

dask/array/overlap.py:50–77  ·  view source on GitHub ↗

Share boundaries between neighboring blocks Parameters ---------- x: da.Array A dask array axes: dict The size of the shared boundary per axis The axes input informs how many cells to overlap between neighboring blocks {0: 2, 2: 5} means share two cells in

(x, axes)

Source from the content-addressed store, hash-verified

48
49
50def overlap_internal(x, axes):
51 """Share boundaries between neighboring blocks
52
53 Parameters
54 ----------
55
56 x: da.Array
57 A dask array
58 axes: dict
59 The size of the shared boundary per axis
60
61 The axes input informs how many cells to overlap between neighboring blocks
62 {0: 2, 2: 5} means share two cells in 0 axis, 5 cells in 2 axis
63 """
64 token = tokenize(x, axes)
65 name = f"overlap-{token}"
66
67 graph = ArrayOverlapLayer(
68 name=x.name,
69 axes=axes,
70 chunks=x.chunks,
71 numblocks=x.numblocks,
72 token=token,
73 )
74 graph = HighLevelGraph.from_collections(name, graph, dependencies=[x])
75 chunks = _overlap_internal_chunks(x.chunks, axes)
76
77 return Array(graph, name, chunks, meta=x)
78
79
80def trim_overlap(x, depth, boundary=None):

Callers 1

overlapFunction · 0.70

Calls 5

ArrayOverlapLayerClass · 0.90
ArrayClass · 0.90
from_collectionsMethod · 0.80
_overlap_internal_chunksFunction · 0.70
tokenizeFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…