Skip to content
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: Error in rolling_var if window is larger than array, fixes #7297 #7572

Merged
merged 1 commit into from
Jul 2, 2014

Conversation

jaimefrio
Copy link
Contributor

fixes #7297

Other rolling window functions rely on the logic in _check_minp, and split the iteration into the ranges [0, minp-1) and (minp-1, N). Because of the way rolling_var handles things, splitting the iteration into [0, win) and (win, N) makes more sense. Added also some comments as to what is going on elsewhere in the code.

No tests have been added, as @kdiether seems to have that very advanced.

@jreback
Copy link
Contributor

jreback commented Jun 26, 2014

@jaimefrio thanks for the fix, just need tests from #7297 (If you want to add ok too). I don't think cc @kdiether has pull his request (yet)

@jreback
Copy link
Contributor

jreback commented Jun 26, 2014

@jaimefrio can you incorporate those tests in the #7297 (if you want to add more complete tests go for it as discussed there). but want to put this in place for 0.14.1

@jaimefrio
Copy link
Contributor Author

Sure, hopefully will get it done tonight, tomorrow at the latest. Will ping here once the tests are in and Travis is OKing it.

@jreback
Copy link
Contributor

jreback commented Jun 30, 2014

pls add a release note in v0.14.1.txt as well thxs

@jreback
Copy link
Contributor

jreback commented Jul 1, 2014

hows this coming?

@jaimefrio
Copy link
Contributor Author

Let's see what Travis thinks, but I think this should be it.

@jaimefrio
Copy link
Contributor Author

The error is unrelated, some Travis setup failure.

jreback added a commit that referenced this pull request Jul 2, 2014
BUG: Error in rolling_var if window is larger than array, fixes #7297
@jreback jreback merged commit 45b1dcd into pandas-dev:master Jul 2, 2014
@jreback
Copy link
Contributor

jreback commented Jul 2, 2014

@jaimefrio thanks for the fixes! (sometimes travis get stuck....I just restarted and all good)

@jaimefrio jaimefrio deleted the rolling_var_bug branch July 2, 2014 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Numeric Operations Arithmetic, Comparison, and Logical operations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Change in behavior for rolling_var when win > len(arr) for 0.14: now raises error
2 participants