Skip to content

feat: add rolling and expanding sum method#11

Open
MarkusSagen wants to merge 1 commit intojmoralez:mainfrom
MarkusSagen:main
Open

feat: add rolling and expanding sum method#11
MarkusSagen wants to merge 1 commit intojmoralez:mainfrom
MarkusSagen:main

Conversation

@MarkusSagen
Copy link

No description provided.

@MarkusSagen
Copy link
Author

@jmoralez PR to include expanding and rolling sum

Copy link
Owner

@jmoralez jmoralez left a comment

Choose a reason for hiding this comment

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

Thanks, just a small comment. Also, can you please update the notebooks? The code is produced the other way around, you update the notebook and then export the python files.


@njit
@_rolling_docstring
def rolling_sum(input_array: np.ndarray, window_size: int, min_samples: int | None = None) -> np.ndarray:
Copy link
Owner

Choose a reason for hiding this comment

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

This is python 3.10+ syntax

Suggested change
def rolling_sum(input_array: np.ndarray, window_size: int, min_samples: int | None = None) -> np.ndarray:
def rolling_sum(input_array: np.ndarray, window_size: int, min_samples: Optional[int] = None) -> np.ndarray:

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.

2 participants