MCPcopy
hub / github.com/dask/dask / coerce_depth

Function coerce_depth

dask/array/overlap.py:785–795  ·  view source on GitHub ↗
(ndim, depth)

Source from the content-addressed store, hash-verified

783
784
785def coerce_depth(ndim, depth):
786 default = 0
787 if depth is None:
788 depth = default
789 if isinstance(depth, Integral):
790 depth = (depth,) * ndim
791 if isinstance(depth, tuple):
792 depth = dict(zip(range(ndim), depth))
793 if isinstance(depth, dict):
794 depth = {ax: depth.get(ax, default) for ax in range(ndim)}
795 return coerce_depth_type(ndim, depth)
796
797
798def coerce_depth_type(ndim, depth):

Callers 3

trim_overlapFunction · 0.70
overlapFunction · 0.70
map_overlapFunction · 0.70

Calls 2

coerce_depth_typeFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…