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

Add extend() method (#17) #21

Merged
merged 1 commit into from
Mar 27, 2021
Merged

Add extend() method (#17) #21

merged 1 commit into from
Mar 27, 2021

Conversation

ajcr
Copy link
Owner

@ajcr ajcr commented Mar 25, 2021

Adds an extend() method to the rolling objects.

For example:

>>> seq = [1, 6, 3, 5, 2]
>>> roll = rolling.Max(seq, 3)
>>> list(roll)     # exhaust iterable
[6, 6, 5]

>>> seq.extend([4, 0])    # extend iterable with two new integers
>>> list(roll)            # two more max window values can be returned
[5, 4]

@ajcr ajcr merged commit c361b18 into master Mar 27, 2021
@ajcr ajcr deleted the extend_iterable branch March 27, 2021 12:18
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

Successfully merging this pull request may close these issues.

1 participant