From 22cb4ff70ce04e5baa6d8288b450d283278c85eb Mon Sep 17 00:00:00 2001 From: qbp758 Date: Fri, 6 Oct 2023 21:36:49 +0200 Subject: [PATCH] fix assert array equal --- python/rainbow/util/test_tools.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/rainbow/util/test_tools.py b/python/rainbow/util/test_tools.py index a0212de..33d13f3 100644 --- a/python/rainbow/util/test_tools.py +++ b/python/rainbow/util/test_tools.py @@ -6,7 +6,7 @@ """ -def is_array_equal(arr1, arr2): +def is_array_equal(arr1, arr2, dec=8): """ 2022-04-06 Kenny TODO: Write proper documentation. @@ -15,7 +15,7 @@ def is_array_equal(arr1, arr2): :param dec: :return: """ - return None == np.testing.assert_allclose(arr1, arr2, rtol=1e-5, atol=1e-8) + return None == np.testing.assert_allclose(arr1, arr2, rtol=10**-dec, atol=10**-dec) def is_array_not_equal(arr1, arr2):