Don't fail sum test on near-cancelling inputs
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Fri, 11 Oct 2024 09:18:43 +0000 (10:18 +0100)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Fri, 11 Oct 2024 09:18:43 +0000 (10:18 +0100)
Failed in 1.5.3+dfsg-11 after it happened to select an input that
cancelled to ~1e-5 (on i386, so x87 excess precision might be involved)

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: no

Gbp-Pq: Name sum_loosen_test_tolerance.patch

pandas/tests/frame/test_reductions.py

index 66145c32c18d772f4316b8b32ddb9965a22b2abc..bd0e38ba594c2f10e4ba5e1d9f8a5df35310db01 100644 (file)
@@ -344,7 +344,7 @@ class TestDataFrameAnalytics:
             np.sum,
             mixed_float_frame.astype("float32"),
             check_dtype=False,
-            rtol=1e-3,
+            rtol=1e-3, atol=1e-3,
         )
 
         assert_stat_op_calc(