MCPcopy Create free account
hub / github.com/numpy/numpy / __or__

Method __or__

numpy/array_api/_array_object.py:692–701  ·  view source on GitHub ↗

Performs the operation __or__.

(self: Array, other: Union[int, bool, Array], /)

Source from the content-addressed store, hash-verified

690 return self.__class__._new(res)
691
692 def __or__(self: Array, other: Union[int, bool, Array], /) -> Array:
693 """
694 Performs the operation __or__.
695 """
696 other = self._check_allowed_dtypes(other, "integer or boolean", "__or__")
697 if other is NotImplemented:
698 return other
699 self, other = self._normalize_two_args(self, other)
700 res = self._array.__or__(other._array)
701 return self.__class__._new(res)
702
703 def __pos__(self: Array, /) -> Array:
704 """

Callers

nothing calls this directly

Calls 3

_check_allowed_dtypesMethod · 0.95
_normalize_two_argsMethod · 0.95
_newMethod · 0.80

Tested by

no test coverage detected