Skip to content

Commit 5bd7eac

Browse files
committed
add explanation for test_rolling_var_same_value_count_logic
1 parent 7909ffe commit 5bd7eac

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

pandas/tests/window/test_rolling.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1867,7 +1867,18 @@ def test_step_not_positive_raises():
18671867
],
18681868
)
18691869
def test_rolling_var_same_value_count_logic(values, window, min_periods, expected):
1870-
# GH 42064
1870+
"""
1871+
For GH 42064.
1872+
1873+
With new algo implemented, result will be set to .0 in rolling var
1874+
if sufficient amount of consecutively same values are found.
1875+
1876+
Below, use `assert_series_equal` twice to check for equality,
1877+
because `check_exact=True` will fail in 32-bit tests due to
1878+
precision loss.
1879+
1880+
"""
1881+
18711882
expected = Series(expected)
18721883

18731884
sr = Series(values)

0 commit comments

Comments
 (0)