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

[Feature Request] Sliding Windows #112

Open
SyxP opened this issue Oct 17, 2023 · 1 comment
Open

[Feature Request] Sliding Windows #112

SyxP opened this issue Oct 17, 2023 · 1 comment

Comments

@SyxP
Copy link

SyxP commented Oct 17, 2023

Given a sequence c_1, c_2, ..., c_n, ... which are outputs of a (possibly infinite) iterator. The windows(c, k) should return an iterator with first entry [c_1, c_2, ..., c_k], second entry [c_2, c_3, ..., c_{k+1}] and so on.

The name is from a common technique called sliding window, mentioned here https://en.cppreference.com/w/cpp/ranges/slide_view .

@oxinabox
Copy link
Member

MLDataUtils.jl provides these btw. in a variety of varieties

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants