-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: Support all Scipy window types in rolling(..., win_type) #37204
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
ENH: Support all Scipy window types in rolling(..., win_type) #37204
Conversation
Hello @mroeschke! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found: There are currently no PEP 8 issues detected in this Pull Request. Cheers! 🍻 Comment last updated at 2020-10-30 19:32:34 UTC |
@@ -451,6 +451,10 @@ The list of recognized types are the `scipy.signal window functions | |||
* ``slepian`` (needs width) | |||
* ``exponential`` (needs tau). | |||
|
|||
.. versionadded:: 1.2.0 | |||
|
|||
All Scipy window types, concurrent with your installed version, are recognized ``win_types``. |
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.
which functions do we now support that we did not before? can u enumerate them
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.
Added. Eventually, we should remove all the enumerated supported window types as it will get stale with scipy developments
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.
maybe
but we do parameter introspection now -
would be ok to fix this up i think and just point to the documentation of the actual window functions
…ing_window_methods
…ing_window_methods
…ing_window_methods
"scipy.signal", extra="Scipy is required to generate window weight." | ||
) | ||
assert self.win_type is not None # for mypy | ||
window = getattr(signal, self.win_type)(self.window, **kwargs) |
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 test if you pass bogus kwargs to a real scipy function.
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.
Done
…ing_window_methods
…ing_window_methods
…ing_window_methods
…ing_window_methods
…ing_window_methods
All green besides the (expected) failing 32-bit build |
…ing_window_methods
…ing_window_methods
…ing_window_methods
thanks @mroeschke |
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff
Additionally cleans up some helper methods