MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / test_max

Function test_max

imperative/python/test/unit/functional/test_math.py:113–118  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

111
112
113def test_max():
114 common_test_reduce(opr=F.max, ref_opr=np.max)
115
116 x = Tensor(np.arange(1, 7, dtype=np.int32).reshape(2, 3))
117 y = F.max(x, axis=-1)
118 np.testing.assert_equal(y.numpy(), np.array([3, 6]).astype(np.int32))
119
120
121def test_argmin():

Callers

nothing calls this directly

Calls 8

TensorClass · 0.90
common_test_reduceFunction · 0.85
assert_equalMethod · 0.80
arrayMethod · 0.80
reshapeMethod · 0.45
maxMethod · 0.45
numpyMethod · 0.45
astypeMethod · 0.45

Tested by

no test coverage detected