MCPcopy Create free account
hub / github.com/Rhoban/placo / assertNumpyEqual

Method assertNumpyEqual

python/tests/problem_test.py:7–10  ·  view source on GitHub ↗
(self, a, b, msg=None, epsilon=1e-6)

Source from the content-addressed store, hash-verified

5
6class TestProblem(unittest.TestCase):
7 def assertNumpyEqual(self, a, b, msg=None, epsilon=1e-6):
8 if msg is None:
9 msg = f"Checking that {a} equals {b}"
10 self.assertTrue(np.linalg.norm(a - b) < epsilon, msg=msg)
11
12 def test_expression_arithmetics(self):
13 problem = placo.Problem()

Callers 13

test_stackingMethod · 0.95
test_simple_solveMethod · 0.95
test_integratorMethod · 0.95
test_soft_inequalityMethod · 0.95
test_expr_tMethod · 0.95
test_integrator_zmpMethod · 0.95

Calls 1

normMethod · 0.80

Tested by

no test coverage detected