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

docs: clarify the expected results for in-place operations for immutable array libraries #895

Merged
merged 5 commits into from
Feb 17, 2025

Conversation

kgryte
Copy link
Contributor

@kgryte kgryte commented Feb 6, 2025

This PR

  • closes Clarification for non-portable behavior for in-place Python operations #828 by indicating that, for libraries which do not implement in-place operators, the equivalence between x1 += x2 and x1 = x1 + x2 only holds when the result of type promotion between x1 and x2 is equal to the dtype of x1. When this does not hold, behavior is unspecified and thus implementation-defined.
  • fixes guidance regarding allowed dtypes for the matmul operator, which was an oversight when adding complex dtype support in the v2023 revision of the standard.

cc @jakevdp @rgommers @oleksandr-pavlyk @seberg

@kgryte kgryte added topic: Type Promotion Type promotion. Backport Changes involve backporting to previous versions. labels Feb 6, 2025
@kgryte kgryte added this to the v2024 milestone Feb 6, 2025
@kgryte kgryte merged commit cfa91d3 into data-apis:main Feb 17, 2025
3 checks passed
@kgryte kgryte deleted the fix/array-object-operations branch February 17, 2025 09:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backport Changes involve backporting to previous versions. topic: Type Promotion Type promotion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarification for non-portable behavior for in-place Python operations
2 participants