Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MegEngine/MegEngine
/ test_max
Function
test_max
imperative/python/test/unit/core/test_zero_dim_tensor.py:25–29 ·
view source on GitHub ↗
()
Source
from the content-addressed store, hash-verified
23
24
25
def
test_max():
26
a = Tensor([1, 2])
27
a = a.reshape((1, 2))
28
assert a.max().ndim == 0
29
assert a.max(axis=1).ndim == 1
30
31
32
def
test_reshape():
Callers
nothing calls this directly
Calls
3
reshape
Method · 0.95
Tensor
Class · 0.90
max
Method · 0.45
Tested by
no test coverage detected