Generate all possible slice tuples for 'shape'.
(ndim, shape)
| 716 | return product(range(-n, n+1), range(-n, n+1), range(-n, n+1)) |
| 717 | |
| 718 | def genslices_ndim(ndim, shape): |
| 719 | """Generate all possible slice tuples for 'shape'.""" |
| 720 | iterables = [genslices(shape[n]) for n in range(ndim)] |
| 721 | return product(*iterables) |
| 722 | |
| 723 | def rslice(n, allow_empty=False): |
| 724 | """Generate random slice for a single dimension of length n. |
nothing calls this directly
no test coverage detected
searching dependent graphs…