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

Function coerce_depth

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

Source from the content-addressed store, hash-verified

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