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

Method __pos__

numpy/array_api/_array_object.py:703–710  ·  view source on GitHub ↗

Performs the operation __pos__.

(self: Array, /)

Source from the content-addressed store, hash-verified

701 return self.__class__._new(res)
702
703 def __pos__(self: Array, /) -> Array:
704 """
705 Performs the operation __pos__.
706 """
707 if self.dtype not in _numeric_dtypes:
708 raise TypeError("Only numeric dtypes are allowed in __pos__")
709 res = self._array.__pos__()
710 return self.__class__._new(res)
711
712 def __pow__(self: Array, other: Union[int, float, Array], /) -> Array:
713 """

Callers

nothing calls this directly

Calls 1

_newMethod · 0.80

Tested by

no test coverage detected