Don't fail sum test on near-cancelling inputs
authorDebian Science Team <debian-science-maintainers@lists.alioth.debian.org>
Fri, 9 Feb 2024 20:48:14 +0000 (20:48 +0000)
committerRebecca N. Palmer <rebecca_palmer@zoho.com>
Fri, 9 Feb 2024 20:48:14 +0000 (20:48 +0000)
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 bec1fcd1e7462beb278bf7e1ee8f03caf89eae0d..b9a7483c6f2ed7235ad2e318cc3d9cd939c5156a 100644 (file)
@@ -258,7 +258,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(