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

Method __rsub__

numpy/array_api/_array_object.py:1015–1024  ·  view source on GitHub ↗

Performs the operation __rsub__.

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

Source from the content-addressed store, hash-verified

1013 return self
1014
1015 def __rsub__(self: Array, other: Union[int, float, Array], /) -> Array:
1016 """
1017 Performs the operation __rsub__.
1018 """
1019 other = self._check_allowed_dtypes(other, "numeric", "__rsub__")
1020 if other is NotImplemented:
1021 return other
1022 self, other = self._normalize_two_args(self, other)
1023 res = self._array.__rsub__(other._array)
1024 return self.__class__._new(res)
1025
1026 def __itruediv__(self: Array, other: Union[float, Array], /) -> Array:
1027 """

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