-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
BUG: Rolling negative window issue fix #13383 #13441
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
Conversation
0cd22d6 to
e000807
Compare
Current coverage is 84.32%@@ master #13441 diff @@
==========================================
Files 138 138
Lines 51068 51072 +4
Methods 0 0
Messages 0 0
Branches 0 0
==========================================
+ Hits 43065 43069 +4
Misses 8003 8003
Partials 0 0
|
pandas/core/window.py
Outdated
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.
there is a another place where this is checked. in _Window (so need a test for that as well)
e000807 to
cb92cba
Compare
pandas/core/window.py
Outdated
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.
do this inside the elif
elif com.is_integer(window):
if window < 0:
raise ......
...
cb92cba to
7c14e29
Compare
pandas/core/window.py
Outdated
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.
With this change, the test case
series.rolling(0, win_type='boxcar') fails,
should we change travis configuration file (requirements-3.5_OSX.build) to have scipy installation as part of the build or change the test case to handle the import error? @jreback
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.
change the test case to skip if scipy is not installed
7c14e29 to
2f79217
Compare
ci/requirements-3.5_OSX.build
Outdated
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.
no, this is left off on purpose
9da3800 to
967ffb8
Compare
pandas/tests/test_window.py
Outdated
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.
make this a separate test (as skipping will cause the entire rest of the test to be skipped)
967ffb8 to
26c9b2d
Compare
|
thanks! |
git diff upstream/master | flake8 --diffAdded functionality in validate function of Rolling to ensure that window size is non-negative.