Skip to content

Conversation

@Illviljan
Copy link
Contributor

No description provided.

Copy link
Collaborator

@dcherian dcherian left a comment

Choose a reason for hiding this comment

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

Exciting to see!

a = np.array([3, 4, 1, 3, 9, 9, 6, 7, 7, 0, 8, 2, 1, 8, 9, 8])
b = npg.aggregate(group_idx, a, func="cumsum")

bb = groupby_reduce(a, group_idx, func="cumsum", engine="numpy")[0]
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's add a groupby_accumulate(a, group_idx, func="sum", engine="numpy) that only returns a single array.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm not a fan that groupby_reduce and groupby_accumulate wont have the same typing though.

Copy link
Collaborator

@dcherian dcherian Jul 7, 2023

Choose a reason for hiding this comment

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

They are very different operations so they have to be. For e.g. method="map-reduce" isn't applicable. fill_value doesn't make any sense I don't think (an initial value does)

Co-authored-by: Deepak Cherian <[email protected]>
Illviljan and others added 19 commits July 10, 2023 20:49
@dcherian dcherian mentioned this pull request Jun 28, 2024
2 tasks
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