Skip to content

Commit

Permalink
Merge branch 'bugfix/assert-array-equal' into test/auto-unit-test
Browse files Browse the repository at this point in the history
  • Loading branch information
qbp758 committed Oct 6, 2023
2 parents 4a345c7 + 22cb4ff commit 47a829e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/rainbow/util/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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):
Expand Down

0 comments on commit 47a829e

Please sign in to comment.