Skip to content

Conversation

@jorenham
Copy link
Member

This fixes the following valid usage in https://github.com/data-apis/array-api-compat/blob/16978e63b744185bc4ced4677c822468e6ddebd2/array_api_compat/numpy/_aliases.py#L126-L127 from being falsely rejected:

def count_nonzero(
    x: Array,
    axis: int | tuple[int, ...] | None = None,
    keepdims: py_bool = False,
) -> Array:
    result = np.count_nonzero(x, axis=axis, keepdims=keepdims)

@jorenham jorenham added 09 - Backport-Candidate PRs tagged should be backported 41 - Static typing labels Apr 17, 2025
@charris charris merged commit b59d8ce into numpy:main Apr 18, 2025
75 checks passed
@charris
Copy link
Member

charris commented Apr 18, 2025

Thanks Joren.

@jorenham jorenham deleted the typing/count_nonzero branch April 18, 2025 18:23
@charris charris removed the 09 - Backport-Candidate PRs tagged should be backported label Apr 19, 2025
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