(ndim, depth)
| 800 | |
| 801 | |
| 802 | def 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 | |
| 815 | def coerce_depth_type(ndim, depth): |
no test coverage detected
searching dependent graphs…