()
| 296 | |
| 297 | |
| 298 | def test_empty_slice(): |
| 299 | data = [np.full((4, 5), 123), np.full((0, 1), 42)] |
| 300 | src = fn.external_source(lambda: data) |
| 301 | pipe = index_pipe(src, lambda x: x[0:0, 0:1]) |
| 302 | inp, cpu, gpu = tuple(out.as_cpu() for out in pipe.run()) |
| 303 | for i in range(len(inp)): |
| 304 | x = inp.at(i) |
| 305 | assert np.array_equal(x[0:0, 0:1], cpu.at(i)) |
| 306 | assert np.array_equal(x[0:0, 0:1], gpu.at(i)) |
| 307 | |
| 308 | |
| 309 | def test_range_truncation(): |
nothing calls this directly
no test coverage detected