From de826899b44b2f730caecd6028f30455e995f570 Mon Sep 17 00:00:00 2001 From: AlexisRalli Date: Wed, 15 Mar 2023 11:22:40 +0000 Subject: [PATCH] fixed test_utils of projection where == replaced by np.isclose --- tests/test_projection/test_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_projection/test_utils.py b/tests/test_projection/test_utils.py index ac15f64..73f89e2 100644 --- a/tests/test_projection/test_utils.py +++ b/tests/test_projection/test_utils.py @@ -17,12 +17,12 @@ def test_norm(): arr = np.random.random(100) - assert(np.linalg.norm(arr) == norm(arr)) + assert np.isclose(np.linalg.norm(arr) == norm(arr)) def test_lp_norm(): arr = np.random.random(100) p = np.random.randint(1, 10) - assert(np.linalg.norm(arr, ord=p) == lp_norm(arr, p=p)) + assert np.isclose(np.linalg.norm(arr, ord=p) == lp_norm(arr, p=p)) def test_update_eigenvalues_insufficient_basis(): G1 = IndependentOp.from_list(['IZ', 'ZI'])