Skip to content

Commit

Permalink
Fix assert_allclose warning
Browse files Browse the repository at this point in the history
  • Loading branch information
norabelrose committed Mar 25, 2023
1 parent b1b95e5 commit ee3911e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/test_eigsh.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def test_lanczos_eigsh(n, which):
w_scipy, v_scipy = eigsh(A.numpy(), which=which)

# Check that the eigenvalues match to within the tolerance
torch.testing.assert_allclose(w, torch.from_numpy(w_scipy), atol=1e-3, rtol=1e-3)
torch.testing.assert_close(w, torch.from_numpy(w_scipy), atol=1e-3, rtol=1e-3)

# Normalize the sign of the eigenvectors
for i in range(v.shape[-1]):
Expand All @@ -30,4 +30,4 @@ def test_lanczos_eigsh(n, which):
v_scipy[:, i] *= -1

# Check that the eigenvectors match to within the tolerance
torch.testing.assert_allclose(v, torch.from_numpy(v_scipy), atol=1e-3, rtol=1e-3)
torch.testing.assert_close(v, torch.from_numpy(v_scipy), atol=1e-3, rtol=1e-3)

0 comments on commit ee3911e

Please sign in to comment.