Skip to content

Commit 8b9bf76

Browse files
author
auderson
committed
comments updated
1 parent 5bd7eac commit 8b9bf76

File tree

1 file changed

+9
-12
lines changed

1 file changed

+9
-12
lines changed

pandas/tests/window/test_rolling.py

+9-12
Original file line numberDiff line numberDiff line change
@@ -1867,22 +1867,19 @@ def test_step_not_positive_raises():
18671867
],
18681868
)
18691869
def test_rolling_var_same_value_count_logic(values, window, min_periods, expected):
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-
"""
1870+
# GH 42064.
18811871

18821872
expected = Series(expected)
1883-
18841873
sr = Series(values)
1874+
1875+
# With new algo implemented, result will be set to .0 in rolling var
1876+
# if sufficient amount of consecutively same values are found.
18851877
result_var = sr.rolling(window, min_periods=min_periods).var()
1878+
1879+
# use `assert_series_equal` twice to check for equality,
1880+
# because `check_exact=True` will fail in 32-bit tests due to
1881+
# precision loss.
1882+
18861883
# 1. result should be close to correct value
18871884
# non-zero values can still differ slightly from "truth"
18881885
# as the result of online algorithm

0 commit comments

Comments
 (0)