-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BUG: Fix inaccurate rolling.var calculation #18481
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a whatsnew note 0.21.1 bug fix
pandas/tests/test_window.py
Outdated
s = pd.Series(np.zeros(20)) | ||
other = pd.Series(np.arange(20)) | ||
|
||
assert s.rolling(window=5).corr(other=other).isna().all() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and for window 0 thru 6
pandas/_libs/window.pyx
Outdated
mean_x[0] = mean_x[0] - delta / nobs[0] | ||
ssqdm_x[0] = ssqdm_x[0] - delta * (val - mean_x[0]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add sone commentary that u r using welford online algos- add a link here
@byospe can you have a look. |
Codecov Report
@@ Coverage Diff @@
## master #18481 +/- ##
==========================================
- Coverage 91.34% 91.3% -0.05%
==========================================
Files 163 163
Lines 49717 49717
==========================================
- Hits 45413 45392 -21
- Misses 4304 4325 +21
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #18481 +/- ##
=========================================
Coverage ? 91.32%
=========================================
Files ? 163
Lines ? 49752
Branches ? 0
=========================================
Hits ? 45434
Misses ? 4318
Partials ? 0
Continue to review full report at Codecov.
|
b5b664c
to
b8e84e3
Compare
@jreback Fixed! |
thanks @Licht-T can you rebase once again. |
@jreback Rebased. |
thanks @Licht-T keep em coming! |
(cherry picked from commit 3d44221)
(cherry picked from commit 3d44221)
git diff upstream/master -u -- "*.py" | flake8 --diff