Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

charris
Copy link
Member

@charris charris commented Apr 19, 2025

Backport of #28750.

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)

@charris charris added 08 - Backport Used to tag backport PRs 41 - Static typing labels Apr 19, 2025
@charris charris merged commit b3e772c into numpy:maintenance/2.2.x Apr 19, 2025
69 checks passed
@charris
Copy link
Member Author

charris commented Apr 19, 2025

Thanks Joren.

@charris charris deleted the backport-28750 branch April 19, 2025 13:18
@jorenham
Copy link
Member

Thanks Joren.

Right back at ya

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
08 - Backport Used to tag backport PRs 41 - Static typing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants