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

Method __pow__

numpy/array_api/_array_object.py:712–723  ·  view source on GitHub ↗

Performs the operation __pow__.

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

Source from the content-addressed store, hash-verified

710 return self.__class__._new(res)
711
712 def __pow__(self: Array, other: Union[int, float, Array], /) -> Array:
713 """
714 Performs the operation __pow__.
715 """
716 from ._elementwise_functions import pow
717
718 other = self._check_allowed_dtypes(other, "numeric", "__pow__")
719 if other is NotImplemented:
720 return other
721 # Note: NumPy's __pow__ does not follow type promotion rules for 0-d
722 # arrays, so we use pow() here instead.
723 return pow(self, other)
724
725 def __rshift__(self: Array, other: Union[int, Array], /) -> Array:
726 """

Callers

nothing calls this directly

Calls 2

_check_allowed_dtypesMethod · 0.95
powFunction · 0.85

Tested by

no test coverage detected