Skip to content

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