(x, ph, pw=None)
| 12 | return x[j:j+ph, i:i+pw] |
| 13 | |
| 14 | def patch(x, ph, pw=None): |
| 15 | if pw is None: |
| 16 | pw = ph |
| 17 | h, w = x.shape[:2] |
| 18 | j = py_rng.randint(0, h-ph) |
| 19 | i = py_rng.randint(0, w-pw) |
| 20 | x = x[j:j+ph, i:i+pw] |
| 21 | return x |
| 22 | |
| 23 | def list_shuffle(*data): |
| 24 | idxs = np_rng.permutation(np.arange(len(data[0]))) |
nothing calls this directly
no outgoing calls
no test coverage detected