Skip to content

Conversation

@tomwhite
Copy link
Member

Loosen from just floating dtypes, as ints are often passed to mean in practice.

From https://data-apis.org/array-api/latest/API_specification/generated/array_api.mean.html#array_api.mean:

While this specification recommends that this function only accept input arrays having a floating-point data type, specification-compliant array libraries may choose to accept input arrays having an integer data type. While mixed data type promotion is implementation-defined, if the input array x has an integer data type, the returned array must have the default real-valued floating-point data type.

@tomwhite tomwhite merged commit 32a0b67 into main Nov 18, 2025
21 checks passed
@tomwhite tomwhite deleted the mean-int branch November 18, 2025 20:40
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