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

Function _safe_len

dali/python/nvidia/dali/ops/_operator_utils.py:81–85  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

79 return any(isinstance(input, list) for input in inputs)
80
81 def _safe_len(input):
82 if isinstance(input, list):
83 return len(input)
84 else:
85 return 1
86
87 def _check_common_length(inputs):
88 """Check if all list representing multiple input sets have the same length and return it"""

Callers 1

_check_common_lengthFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected