(ndim, depth)
| 787 | |
| 788 | |
| 789 | def 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 | |
| 802 | def coerce_depth_type(ndim, depth): |
no test coverage detected