diff --git a/spec/API_specification/array_object.md b/spec/API_specification/array_object.md index a8eb39104..c5ea23491 100644 --- a/spec/API_specification/array_object.md +++ b/spec/API_specification/array_object.md @@ -153,6 +153,9 @@ 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 not change the dtype or shape of the in-place array +as a result of {ref}`type-promotion` or {ref}`broadcasting`. + ```{note} In-place operators must be supported as discussed in {ref}`copyview-mutability`. diff --git a/spec/API_specification/type_promotion.md b/spec/API_specification/type_promotion.md index d9862db88..a0e66f18c 100644 --- a/spec/API_specification/type_promotion.md +++ b/spec/API_specification/type_promotion.md @@ -102,9 +102,9 @@ arrays must be supported for: - `array scalar` - `scalar array` -where `` is a built-in operator (see {ref}`operators` for operators -supported by the array object) and `scalar` has a compatible type and value -to the array dtype: +where `` is a built-in operator, including in-place operators (see +{ref}`operators` for operators supported by the array object) and `scalar` has +a compatible type and value to the array dtype: - Python `bool` for a `bool` array dtype, - a Python `int` within the [bounds](data-types) of the given dtype for integer array dtypes, - a Python `int` or `float` for floating-point array dtypes