Skip to content

Commit 68a77c7

Browse files
committed
increase tolerance for cross platform compat
1 parent 0f1d864 commit 68a77c7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/test_orthonormal.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@ def test_get_orthonormal_basis(Phi):
2121

2222
# Check if the basis vectors are orthogonal to each other
2323
assert jnp.allclose(
24-
jnp.dot(basis_vectors, basis_vectors.T), jnp.eye(basis_vectors.shape[0])
24+
jnp.dot(basis_vectors, basis_vectors.T),
25+
jnp.eye(basis_vectors.shape[0]),
26+
atol=1e-6,
2527
), f"<A, A.T> should be I, got {jnp.dot(basis_vectors, basis_vectors.T)}"
2628

2729
# Check if bases is orthogonal to Phi
28-
assert jnp.allclose(jnp.dot(basis_vectors, Phi), 0.0), (
30+
assert jnp.allclose(jnp.dot(basis_vectors, Phi), 0.0, atol=1e-6), (
2931
"Basis vectors should be orthogonal to Phi"
3032
)
3133

0 commit comments

Comments
 (0)