Skip to content

Commit

Permalink
Update test_corr.py
Browse files Browse the repository at this point in the history
  • Loading branch information
liqitong-a committed Apr 29, 2022
1 parent e97d91c commit 4fca073
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/paddle/fluid/tests/unittests/test_corr.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def test_tensor_corr_default(self):
tensor = paddle.to_tensor(np_arr, place=p)
corr = paddle.linalg.corrcoef(tensor)
np_corr = numpy_corr(np_arr, rowvar=True, dtype=dtype)
if dtype=='float32':
if dtype == 'float32':
self.assertTrue(
np.allclose(
np_corr, corr.numpy(), atol=1.e-5))
Expand All @@ -68,7 +68,7 @@ def test_tensor_corr_rowvar(self):
tensor = paddle.to_tensor(np_arr, place=p)
corr = paddle.linalg.corrcoef(tensor, rowvar=False)
np_corr = numpy_corr(np_arr, rowvar=False, dtype=dtype)
if dtype=='float32':
if dtype == 'float32':
self.assertTrue(
np.allclose(
np_corr, corr.numpy(), atol=1.e-5))
Expand Down

0 comments on commit 4fca073

Please sign in to comment.