__add__

array.__add__(other: int | float | array, /) array

Calculates the sum for each element of an array instance with the respective element of the array other.

Parameters:
  • self (array) – array instance (augend array). Should have a numeric data type.

  • other (Union[int, float, array]) – addend array. Must be compatible with self (see Broadcasting). Should have a numeric data type.

Returns:

out (array) – an array containing the element-wise sums. The returned array must have a data type determined by Type Promotion Rules.

Notes

Note

Element-wise results, including special cases, must equal the results returned by the equivalent element-wise function add().

Changed in version 2022.12: Added complex data type support.