MCPcopy Create free account
hub / github.com/alibaba/MNN / assertEqualArray

Method assertEqualArray

pymnn/test/unit_test.py:54–56  ·  view source on GitHub ↗
(self, l, r, rtol=1e-3, atol=1e-3)

Source from the content-addressed store, hash-verified

52 self.currentResult = result
53 unittest.TestCase.run(self, result)
54 def assertEqualArray(self, l, r, rtol=1e-3, atol=1e-3):
55 self.assertEqual(l.shape, r.shape)
56 self.assertTrue(np.allclose(l, r, rtol=rtol, atol=atol))
57 def assertEqualVar(self, l, r, rtol=1e-3, atol=1e-3):
58 # TODO: MNN not support empty Var
59 if r.size == 0:

Callers 8

assertEqualVarMethod · 0.95
assertEqualPointsMethod · 0.95
test_TensorMethod · 0.95
test_StructuralMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected