Skip to content

feat: add cumulative_prod specification #793

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

Merged
merged 3 commits into from
Dec 12, 2024

Conversation

kgryte
Copy link
Contributor

@kgryte kgryte commented Apr 18, 2024

This PR

  • resolves RFC: add support for computing the cumulative product to the standard #598 by adding cumulative_prod to the specification for computing the cumulative product.
  • follows cumulative_sum in matching axis, dtype, and include_initial semantics.
  • as with cumulative_sum, this specification differs from NumPy in that flattening is not the default behavior. Similar to PyTorch, an axis argument is required if the input array has more than one dimension.

@kgryte kgryte added API extension Adds new functions or objects to the API. topic: Statistics Statistics. Needs Review Pull request which needs review. labels Apr 18, 2024
@kgryte kgryte added this to the v2024 milestone Apr 18, 2024
@asmeurer
Copy link
Member

#797 is relevant here too.

@kgryte kgryte added the Needs Changes Pull request which needs changes before being merged. label Jul 25, 2024
@kgryte kgryte removed the Needs Changes Pull request which needs changes before being merged. label Oct 31, 2024
@kgryte
Copy link
Contributor Author

kgryte commented Oct 31, 2024

Update: I've added a note similar to what's suggested for cumulative_sum in #851.

@kgryte kgryte removed the Needs Review Pull request which needs review. label Dec 12, 2024
@kgryte
Copy link
Contributor Author

kgryte commented Dec 12, 2024

As this PR has not received any objections since April 18, is consistent with cumulative_sum, and has been previously discussed during workgroup meeting, I'll go ahead and merge. Any further changes can be addressed in follow-up PRs.

@kgryte kgryte merged commit c492972 into data-apis:main Dec 12, 2024
3 checks passed
@kgryte kgryte deleted the feat/cumulative_prod branch December 12, 2024 10:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API extension Adds new functions or objects to the API. topic: Statistics Statistics.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC: add support for computing the cumulative product to the standard
2 participants