-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Feature Request: Efficient rolling with strides #3608
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
Comments
Originally posted by @pilkibun in pandas-dev/pandas#26959 (comment) |
Is this useful/relevant for you? dask/dask#7234 |
No. but this should be really easy to fix.
Lines 441 to 443 in 57a4479
We should also add it to bottleneck does not support stride so we can only use a Line 518 in 57a4479
Note: |
Quickly glancing over
I think that's what I did in #3607. It's been a while |
For |
Question: instead of adding I've been confused why some parameters are available only in |
You are right. It's quite confusing. I've already added a |
Xarray is facing the same issues in its current
rolling
implementation (DataArrayRolling
andDatasetRolling
) as described in this pandas issue. Namely, theconstruct
methods stride parameter is applied after the rolling is computed. Technically, we are computing more than we would need to because we partially throwing it away due to striding.In PR #3607 the issue is solved for the
...Rolling
's__iter__
function but not for theconstruct
,reduce
and_bottleneck_reduce
methods.Since the way Xarray's rolling is implemented relies on numpy, we could introduce a sliding window function as described here.
Any opinions?
The text was updated successfully, but these errors were encountered: