Skip to content

TYP: count_nonzero shape-typing - #32574

Merged
charris merged 1 commit into
numpy:mainfrom
jorenham:typing/count_nonzero/shape-typing
Sep 10, 2026
Merged

charris merged 1 commit into
numpy:mainfrom
jorenham:typing/count_nonzero/shape-typing

Conversation

@jorenham

Copy link
Copy Markdown
Member

np.count_nonzero now returns an array with exact shape-type for <=4d array likes and in general when keepdims=True.


Pair programmed with AI.

@jorenham jorenham added this to the 2.6.0 Release milestone Sep 10, 2026
@charris
charris merged commit 28df459 into numpy:main Sep 10, 2026
15 of 16 checks passed
@charris

charris commented Sep 10, 2026

Copy link
Copy Markdown
Member

Thanks Joren.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants