(ndim, depth)
| 783 | |
| 784 | |
| 785 | def 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 | |
| 798 | def coerce_depth_type(ndim, depth): |
no test coverage detected
searching dependent graphs…