MCPcopy 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
25def 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
32def test_reshape():

Callers

nothing calls this directly

Calls 3

reshapeMethod · 0.95
TensorClass · 0.90
maxMethod · 0.45

Tested by

no test coverage detected