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

feat: add count_nonzero to specification #803

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

kgryte
Copy link
Contributor

@kgryte kgryte commented May 2, 2024

This PR

  • resolves RFC: add count_nonzero for counting the number of "non-zero" values #794 by adding support for counting the number of non-zero values to the specification.
  • is consistent with statistical functions (such as max, mean, sum, etc) in supporting one or more axes over which to perform the reduction and in supporting keepdims to ensure the returned result is broadcast compatible.
  • follows nonzeros (ref: Add specifications for functions for searching arrays #23 (comment)) in disallowing zero-dimensional input arrays. Note, however, that the statistical function APIs do not contain any explicit guidance regarding minimum rank. Update: based on discussions during the May 2, 2024 workgroup meeting, consensus was to allow 0d input arrays. The proposed specification has been updated accordingly.
  • updates nonzeros by moving the notes to a dedicated notes section (i.e., below the "fold").

@kgryte kgryte added the API extension Adds new functions or objects to the API. label May 2, 2024
@kgryte kgryte added this to the v2024 milestone May 2, 2024
@kgryte kgryte added the Needs Changes Pull request which needs changes before being merged. label Jul 25, 2024
@kgryte kgryte added Needs Review Pull request which needs review. and removed Needs Changes Pull request which needs changes before being merged. labels Oct 31, 2024
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. Needs Review Pull request which needs review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RFC: add count_nonzero for counting the number of "non-zero" values
1 participant