Skip to content

Commit 680ccde

Browse files
committed
Tweak tolerance in arange test
1 parent 799e547 commit 680ccde

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/tensor/test_basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2571,7 +2571,7 @@ def test_float32(self, cast_policy):
25712571
start_v_, stop_v_, step_v_, dtype=out.dtype
25722572
)
25732573

2574-
assert np.all(f_val == expected_val)
2574+
np.testing.assert_allclose(f_val, expected_val, strict=True, rtol=3e-7)
25752575

25762576
@pytest.mark.parametrize(
25772577
"cast_policy",
@@ -2608,7 +2608,7 @@ def test_float64(self, cast_policy):
26082608
elif config.cast_policy == "numpy+floatX":
26092609
expected_val = np.arange(start_v_, stop_v_, step_v_)
26102610

2611-
assert np.all(f_val == expected_val)
2611+
np.testing.assert_allclose(f_val, expected_val, strict=True)
26122612

26132613
@pytest.mark.parametrize(
26142614
"cast_policy",

0 commit comments

Comments
 (0)