(n, step)
| 238 | raise ValueError() |
| 239 | |
| 240 | def random_slice(n, step): |
| 241 | start = rng.randint(0, n+1, dtype=np.intp) |
| 242 | stop = rng.randint(start, n+1, dtype=np.intp) |
| 243 | if rng.randint(0, 2, dtype=np.intp) == 0: |
| 244 | stop, start = start, stop |
| 245 | step *= -1 |
| 246 | return slice(start, stop, step) |
| 247 | |
| 248 | def random_slice_fixed_size(n, step, size): |
| 249 | start = rng.randint(0, n+1 - size*step) |
no outgoing calls
no test coverage detected