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

Function roundint

dali/test/python/operator_1/test_slice.py:38–40  ·  view source on GitHub ↗
(num)

Source from the content-addressed store, hash-verified

36
37
38def roundint(num):
39 # std::round has different behavior than np.round so manually add 0.5 and truncate to int
40 return int(num + (0.5 if num >= 0 else -0.5))
41
42
43def abs_slice_start_and_end(

Callers 2

abs_slice_start_and_endFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected