Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ get_numpy
Function
get_numpy
imperative/python/test/unit/jit/test_tracing.py:47–52 ·
view source on GitHub ↗
(y)
Source
from the content-addressed store, hash-verified
45
return
-x
46
47
def
get_numpy(y):
48
if
return_mode ==
"Tuple"
or return_mode ==
"List"
:
49
return
y[0].numpy()
50
elif
return_mode ==
"Dict"
:
51
return
y[
"neg"
].numpy()
52
return
y.numpy()
53
54
x = tensor([1])
55
y = get_numpy(f(x))
Callers
1
test_trace
Function · 0.85
Calls
1
numpy
Method · 0.45
Tested by
no test coverage detected