Skip to content

Commit 778f25c

Browse files
committed
Use isclose instead of exact equality when testing sum of large Series
1 parent 14f8d17 commit 778f25c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

pandas/tests/reductions/test_reductions.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -751,9 +751,8 @@ def test_sum_overflow_float(self, use_bottleneck, dtype):
751751
with pd.option_context("use_bottleneck", use_bottleneck):
752752
v = np.arange(5000000, dtype=dtype)
753753
s = Series(v)
754-
755754
result = s.sum(skipna=False)
756-
assert result == v.sum(dtype=dtype)
755+
assert np.isclose(result, v.sum(dtype=dtype))
757756
result = s.min(skipna=False)
758757
assert np.allclose(float(result), 0.0)
759758
result = s.max(skipna=False)

0 commit comments

Comments
 (0)