Skip to content

Clarify in-place operations mirror special case behaviour #299

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

Merged
merged 3 commits into from
Nov 4, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions spec/API_specification/array_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ an array object supporting the following in-place Python operators:
An in-place operation must not change the dtype or shape of the in-place array
as a result of {ref}`type-promotion` or {ref}`broadcasting`.

An in-place operation must have the same behavior (including special cases) as
its respective binary (i.e., two operand, non-assignment) operation. For example,
after in-place addition `x1 += x2`, the modified array `x1` must always equal the
result of the equivalent binary arithmetic operation `x1 = x1 + x2`.

```{note}

In-place operators must be supported as discussed in {ref}`copyview-mutability`.
Expand Down