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

Function coerce_depth

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

Source from the content-addressed store, hash-verified

787
788
789def coerce_depth(ndim, depth):
790 default = 0
791 if depth is None:
792 depth = default
793 if isinstance(depth, Integral):
794 depth = (depth,) * ndim
795 if isinstance(depth, tuple):
796 depth = dict(zip(range(ndim), depth))
797 if isinstance(depth, dict):
798 depth = {ax: depth.get(ax, default) for ax in range(ndim)}
799 return coerce_depth_type(ndim, depth)
800
801
802def 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