Skip to content

Commit 91d710d

Browse files
committed
added .any()
1 parent a3c1167 commit 91d710d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_integrate.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -840,5 +840,5 @@ def grad_fn(params: jnp.ndarray) -> jnp.ndarray:
840840
except Exception as e:
841841
pytest.fail(f"An unexpected exception was raised: {e}")
842842

843-
assert not jnp.isnan(grad), "Gradient should not be NaN."
844-
assert not jnp.isinf(grad), "Gradient should not be infinite."
843+
assert not jnp.isnan(grad).any(), "Gradient should not be NaN."
844+
assert not jnp.isinf(grad).any(), "Gradient should not be infinite."

0 commit comments

Comments
 (0)