Skip to content

Commit a3ec4ba

Browse files
author
Vahid Tavanashad
committed
use dpnp.allclose
1 parent dbdbfe9 commit a3ec4ba

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

dpnp/tests/test_linalg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1454,12 +1454,12 @@ def test_different_paths(self, dtype):
14541454
# Use einsum to compare to not have difference due to sum round-offs:
14551455
result1 = dpnp.einsum(",i->", s_dp, a_dp)
14561456
result2 = dpnp.einsum("i->", s_dp * a_dp)
1457-
assert_array_equal(result1, result2)
1457+
assert dpnp.allclose(result1, result2)
14581458

14591459
# contig + scalar -> scalar
14601460
# Use einsum to compare to not have difference due to sum round-offs:
14611461
result3 = dpnp.einsum("i,->", a_dp, s_dp)
1462-
assert_array_equal(result1, result2)
1462+
assert dpnp.allclose(result2, result3)
14631463

14641464
# contig + contig + contig -> scalar
14651465
a = numpy.array([0.5, 0.5, 0.25, 4.5, 3.0], dtype=dtype)

0 commit comments

Comments
 (0)