MCPcopy Create free account
hub / github.com/NVIDIA/DALI / _test_out_of_range

Function _test_out_of_range

dali/test/python/operator_2/test_subscript.py:225–230  ·  view source on GitHub ↗
(device, idx)

Source from the content-addressed store, hash-verified

223
224
225def _test_out_of_range(device, idx):
226 data = [np.uint8([1, 2, 3]), np.uint8([1, 2])]
227 src = fn.external_source(lambda: data, device=device)
228 pipe = index_pipe(src, lambda x: x[idx])
229 with assert_raises(RuntimeError, glob="out of range"):
230 _ = pipe.run()
231
232
233def test_out_of_range():

Callers

nothing calls this directly

Calls 4

assert_raisesFunction · 0.90
index_pipeFunction · 0.85
uint8Method · 0.80
runMethod · 0.45

Tested by

no test coverage detected