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

Function real

numpy/array_api/_elementwise_functions.py:627–635  ·  view source on GitHub ↗

Array API compatible wrapper for :py:func:`np.real `. See its docstring for more information.

(x: Array, /)

Source from the content-addressed store, hash-verified

625
626
627def real(x: Array, /) -> Array:
628 """
629 Array API compatible wrapper for :py:func:`np.real <numpy.real>`.
630
631 See its docstring for more information.
632 """
633 if x.dtype not in _complex_floating_dtypes:
634 raise TypeError("Only complex floating-point dtypes are allowed in real")
635 return Array._new(np.real(x))
636
637
638def remainder(x1: Array, x2: Array, /) -> Array:

Callers

nothing calls this directly

Calls 2

_newMethod · 0.80
realMethod · 0.80

Tested by

no test coverage detected