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

Can the rolling.Apply support multidimensional? #16

Open
thouger opened this issue Oct 9, 2018 · 3 comments
Open

Can the rolling.Apply support multidimensional? #16

thouger opened this issue Oct 9, 2018 · 3 comments

Comments

@thouger
Copy link

thouger commented Oct 9, 2018

Now rolling.apply can roll window at one-dimensional,will be able to support multidimensional in the future?Like that:
image
I find it will be finish in that "https://gist.github.com/seberg/3866040".

@ajcr
Copy link
Owner

ajcr commented Oct 14, 2018

Hi @thouger, thanks for the link. My intention is that this library will only support 1D rolling windows, unlike the NumPy example. This is for a couple of reasons:

  • I want to be able to support arbitrary iterators (like generators), not just fixed-length containers such as arrays. Adding support for higher dimensions is possible in theory, but very difficult to get right in practice (NumPy's implementation is very impressive).
  • My focus for this library is on implementing computationally efficient algorithms over rolling windows and it's not clear to me how some algorithms could be extended to higher dimensions (operations over windows generated using as_strided are not efficient as values must be iterated over multiple times to perform the reduction on the window).

@thouger
Copy link
Author

thouger commented Oct 15, 2018

Hi @ajcr ,thanks for you answer,The reason that i want to add is because the "rolling" package is very overall package about 1D in pip.Because it can print the iterators result and it's a feature that numpy doesn't have(numpy only provide the result such as max,min when rolling window),so if the rolling package can print n-dimensional result when rolling window that will be even excellent.
I will continue to explore the rolling window n-dimensional method.

@ajcr
Copy link
Owner

ajcr commented Oct 15, 2018

Thanks @thouger: I'll give your suggestion some more thought. It might be possible to find a solution.

@thouger thouger closed this as completed Jan 23, 2019
@thouger thouger reopened this Jan 23, 2019
@thouger thouger closed this as completed Jan 23, 2019
@thouger thouger reopened this Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants