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/cumsum #1988

Merged
merged 5 commits into from
Sep 14, 2023
Merged

Conversation

Eliotdoesprogramming
Copy link
Contributor

Fixes #1981

Summary

adds the cumsum function to the Timeseries class. Implementation uses the xarray implementation of cumsum.

Additionally adds unit tests for the cumsum function when n=1 and n=2

let me know if this needs any more refinement, thanks!

@Eliotdoesprogramming Eliotdoesprogramming changed the title added cumsum function to time series feature/cumsum Sep 9, 2023
@codecov-commenter
Copy link

Codecov Report

Patch coverage is 87.50% of modified lines.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Files Changed Coverage
darts/timeseries.py 87.50%

📢 Thoughts on this report? Let us know!.

Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot for this PR @Eliotdoesprogramming 🚀

I added some suggestions, mainly that I would opt for dropping support for n in cumsum.

After that we can merge :)

darts/timeseries.py Outdated Show resolved Hide resolved
darts/timeseries.py Outdated Show resolved Hide resolved
darts/tests/test_timeseries.py Outdated Show resolved Hide resolved
darts/tests/test_timeseries.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@dennisbader dennisbader left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @Eliotdoesprogramming for this PR, looks great now 🚀

I applied the requested changes as we want to release the new version soon.

@dennisbader dennisbader merged commit a9b6fbc into unit8co:master Sep 14, 2023
7 of 9 checks passed
@Eliotdoesprogramming
Copy link
Contributor Author

np thanks for doing it! I get a bit busy during the week. Happy to contribute

@Eliotdoesprogramming Eliotdoesprogramming deleted the feature/cumsum branch September 15, 2023 16:46
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.

Cumulative Sum on Timeseries class
3 participants