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

Function _get_array_interface

dali/python/nvidia/dali/experimental/dynamic/_tensor.py:53–60  ·  view source on GitHub ↗
(data)

Source from the content-addressed store, hash-verified

51
52
53def _get_array_interface(data):
54 if a_func := getattr(data, "__array__", None):
55 try:
56 return a_func()
57 except TypeError: # CUDA torch tensor, CuPy array, etc.
58 return None
59 else:
60 return None
61
62
63def _try_convert_enums(arr):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected