Skip to content

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