Skip to content

Commit

Permalink
Do not use absolute tolerance of 0 in tests
Browse files Browse the repository at this point in the history
This fails sometimes for values expected to be 0
  • Loading branch information
mstimberg committed Mar 11, 2024
1 parent 518410c commit 4bd1e55
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion brian2/tests/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from brian2.units.fundamentalunits import have_same_dimensions


def assert_allclose(actual, desired, rtol=4.5e8, atol=0, **kwds):
def assert_allclose(actual, desired, rtol=4.5e8, atol=1e-9, **kwds):
"""
Thin wrapper around numpy's `~numpy.testing.utils.assert_allclose` function. The tolerance depends on the floating
point precision as defined by the `core.default_float_dtype` preference.
Expand Down

0 comments on commit 4bd1e55

Please sign in to comment.