()
| 282 | |
| 283 | |
| 284 | def test_multiple_skipped_dims(): |
| 285 | data = [ |
| 286 | np.arange(64, dtype=np.float32).reshape(4, 2, 2, 4), |
| 287 | np.arange(120, dtype=np.float32).reshape(4, 2, 3, 5), |
| 288 | ] |
| 289 | src = fn.external_source(lambda: data, layout="ABCD") |
| 290 | pipe = index_pipe(src, lambda x: x[1, :, :, 1]) |
| 291 | inp, cpu, gpu = tuple(out.as_cpu() for out in pipe.run()) |
| 292 | for i in range(len(inp)): |
| 293 | x = inp.at(i) |
| 294 | assert np.array_equal(x[1, :, :, 1], cpu.at(i)) |
| 295 | assert np.array_equal(x[1, :, :, 1], gpu.at(i)) |
| 296 | |
| 297 | |
| 298 | def test_empty_slice(): |
nothing calls this directly
no test coverage detected