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

Method __mod__

numpy/array_api/_array_object.py:650–659  ·  view source on GitHub ↗

Performs the operation __mod__.

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

Source from the content-addressed store, hash-verified

648 return self.__class__._new(res)
649
650 def __mod__(self: Array, other: Union[int, float, Array], /) -> Array:
651 """
652 Performs the operation __mod__.
653 """
654 other = self._check_allowed_dtypes(other, "real numeric", "__mod__")
655 if other is NotImplemented:
656 return other
657 self, other = self._normalize_two_args(self, other)
658 res = self._array.__mod__(other._array)
659 return self.__class__._new(res)
660
661 def __mul__(self: Array, other: Union[int, float, Array], /) -> Array:
662 """

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