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

Function test_zero_stride_error

dali/test/python/operator_2/test_subscript.py:264–269  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

262
263
264def test_zero_stride_error():
265 data = [np.uint8([1, 2, 3]), np.uint8([1, 2])]
266 src = fn.external_source(lambda: data)
267 pipe = index_pipe(src, lambda x: x[::0])
268 with assert_raises(RuntimeError, glob="Step cannot be zero"):
269 _ = pipe.run()
270
271
272def test_too_many_indices():

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