Skip to content

Conversation

@pt247
Copy link

@pt247 pt247 commented Mar 26, 2016


def _offset(window, center):
if com.is_float(window):
raise TypeError("Window should be of type Integer, given Float")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to use if not com.is_integer(window): raise TypeError but that will clearly need to happen at a another point in the code, because at this point we accept arrays (see line below)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this needs to happen in the _Rolling constructor. if window is not None then it can be tested for being an integer (or raise TypeError)

@jreback
Copy link
Contributor

jreback commented Apr 1, 2016

competing PR is #12714

@jreback jreback added Reshaping Concat, Merge/Join, Stack/Unstack, Explode Error Reporting Incorrect or improved errors from pandas labels Apr 1, 2016
@jreback
Copy link
Contributor

jreback commented Apr 10, 2016

can you rebase/update according to comments

@jreback
Copy link
Contributor

jreback commented Apr 20, 2016

can you rebase / update

@jreback
Copy link
Contributor

jreback commented Apr 26, 2016

superseded by #13002

@jreback jreback closed this Apr 26, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Error Reporting Incorrect or improved errors from pandas Reshaping Concat, Merge/Join, Stack/Unstack, Explode

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ERR: better error message on invalid window when using .rolling

3 participants