(ndim, boundary)
| 822 | |
| 823 | |
| 824 | def coerce_boundary(ndim, boundary): |
| 825 | default = "none" |
| 826 | if boundary is None: |
| 827 | boundary = default |
| 828 | if not isinstance(boundary, (tuple, dict)): |
| 829 | boundary = (boundary,) * ndim |
| 830 | if isinstance(boundary, tuple): |
| 831 | boundary = dict(zip(range(ndim), boundary)) |
| 832 | if isinstance(boundary, dict): |
| 833 | boundary = {ax: boundary.get(ax, default) for ax in range(ndim)} |
| 834 | return boundary |
| 835 | |
| 836 | |
| 837 | @derived_from(np.lib.stride_tricks) |
no test coverage detected
searching dependent graphs…