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

Method __xor__

numpy/array_api/_array_object.py:779–788  ·  view source on GitHub ↗

Performs the operation __xor__.

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

Source from the content-addressed store, hash-verified

777 return self.__class__._new(res)
778
779 def __xor__(self: Array, other: Union[int, bool, Array], /) -> Array:
780 """
781 Performs the operation __xor__.
782 """
783 other = self._check_allowed_dtypes(other, "integer or boolean", "__xor__")
784 if other is NotImplemented:
785 return other
786 self, other = self._normalize_two_args(self, other)
787 res = self._array.__xor__(other._array)
788 return self.__class__._new(res)
789
790 def __iadd__(self: Array, other: Union[int, float, Array], /) -> Array:
791 """

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