__or__

array.__or__(other: int | bool | array, /) array

Evaluates self_i | other_i for each element of an array instance with the respective element of the array other.

Parameters:
  • self (array) – array instance. Should have an integer or boolean data type.

  • other (Union[int, bool, array]) – other array. Must be compatible with self (see Broadcasting). Should have an integer or boolean data type.

Returns:

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

Notes

Note

Element-wise results must equal the results returned by the equivalent element-wise function bitwise_or().

Changed in version 2022.12: Added complex data type support.