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

Method __rpow__

numpy/array_api/_array_object.py:971–982  ·  view source on GitHub ↗

Performs the operation __rpow__.

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

Source from the content-addressed store, hash-verified

969 return self
970
971 def __rpow__(self: Array, other: Union[int, float, Array], /) -> Array:
972 """
973 Performs the operation __rpow__.
974 """
975 from ._elementwise_functions import pow
976
977 other = self._check_allowed_dtypes(other, "numeric", "__rpow__")
978 if other is NotImplemented:
979 return other
980 # Note: NumPy's __pow__ does not follow the spec type promotion rules
981 # for 0-d arrays, so we use pow() here instead.
982 return pow(other, self)
983
984 def __irshift__(self: Array, other: Union[int, Array], /) -> Array:
985 """

Callers

nothing calls this directly

Calls 2

_check_allowed_dtypesMethod · 0.95
powFunction · 0.85

Tested by

no test coverage detected