Skip to content

Commit

Permalink
Explicitly set rtol to 0 when determining expected value of equality …
Browse files Browse the repository at this point in the history
…checks. QuTiP's implementation does not use rtol.
  • Loading branch information
hodgestar committed Apr 17, 2023
1 parent cb9f849 commit 133677f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions qutip/tests/core/data/test_operators_hypothesis.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def test_data_iszero(data):
with qst.ignore_arithmetic_warnings():
np_array = data.to_array()
expected = numpy.allclose(
np_array, numpy.zeros_like(np_array), atol=1e-15, rtol=1e-15,
np_array, numpy.zeros_like(np_array), atol=1e-15, rtol=0,
)
assert result is expected

Expand Down Expand Up @@ -115,7 +115,7 @@ def test_data_equality_operator_same_shapes(a, b):
expected = numpy.allclose(
numpy.zeros(a.shape),
a.to_array() - b.to_array(),
atol=1e-15
atol=1e-15, rtol=0,
)
assert result == expected

Expand Down

0 comments on commit 133677f

Please sign in to comment.