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 1 commit
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
4 changes: 4 additions & 0 deletions spec/API_specification/array_object.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,10 @@ an array object supporting the following in-place Python operators:
- `<<=`. May be implemented via `__ilshift__`.
- `>>=`. May be implemented via `__irshift__`.

An in-place operation must follow all the special cases of its respective
standard operation (e.g. `__radd__` has the same special case behaviour as
`__add__`).

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`.

Expand Down