From 7cd2e8a65bc813538e159190f0a7a695b192f48d Mon Sep 17 00:00:00 2001 From: Takashi Imamichi Date: Mon, 11 Sep 2023 18:09:45 +0900 Subject: [PATCH] fix a unit test error for M1 --- test/algorithms/test_admm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/algorithms/test_admm.py b/test/algorithms/test_admm.py index d9c3b39aa..cb31076a1 100644 --- a/test/algorithms/test_admm.py +++ b/test/algorithms/test_admm.py @@ -211,7 +211,7 @@ def test_admm_ex5_warm_start(self): self.assertIsNotNone(solution) self.assertIsInstance(solution, ADMMOptimizationResult) self.assertIsNotNone(solution.x) - np.testing.assert_almost_equal([0.0, 1.0, 0.0], solution.x, 3) + self.assertTrue(np.allclose(solution.x, [0, 1, 0]) or np.allclose(solution.x, [1, 0, 0])) self.assertIsNotNone(solution.fval) np.testing.assert_almost_equal(1.0, solution.fval, 3) self.assertIsNotNone(solution.state)