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

Function coerce_depth

dask/array/_array_expr/_overlap.py:802–812  ·  view source on GitHub ↗
(ndim, depth)

Source from the content-addressed store, hash-verified

800
801
802def coerce_depth(ndim, depth):
803 default = 0
804 if depth is None:
805 depth = default
806 if isinstance(depth, Integral):
807 depth = (depth,) * ndim
808 if isinstance(depth, tuple):
809 depth = dict(zip(range(ndim), depth))
810 if isinstance(depth, dict):
811 depth = {ax: depth.get(ax, default) for ax in range(ndim)}
812 return coerce_depth_type(ndim, depth)
813
814
815def 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…