Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/NVIDIA/DALI
/ asnumpy
Function
asnumpy
dali/test/python/test_external_source_impl.py:49–56 ·
view source on GitHub ↗
(x)
Source
from the content-addressed store, hash-verified
47
48
49
def
asnumpy(x):
50
if
x is None:
51
return
None
52
if
isinstance(x, list):
53
return
[asnumpy(y)
for
y in x]
54
if
isinstance(x, np.ndarray):
55
return
x
56
return
_to_numpy(x)
57
58
59
def
use_cupy():
Callers
3
run_and_check
Function · 0.70
test_external_source_collection_cycling
Function · 0.70
test_external_source_collection_cycling_raise
Function · 0.70
Calls
1
_to_numpy
Function · 0.85
Tested by
no test coverage detected