jax.numpy.real
Contents
jax.numpy.real#
- jax.numpy.real(val,/)[source]#
Return element-wise real part of the complex argument.
JAX implementation of
numpy.real.- Parameters:
val (ArrayLike) – input array or scalar.
- Returns:
An array containing the real part of the elements of
val.- Return type:
See also
jax.numpy.conjugate()andjax.numpy.conj(): Returns the element-wisecomplex-conjugate of the input.jax.numpy.imag(): Returns the element-wise imaginary part of thecomplex argument.
Examples
>>>jnp.real(5)Array(5, dtype=int32, weak_type=True)>>>jnp.real(2j)Array(0., dtype=float32, weak_type=True)>>>x=jnp.array([3-2j,4+7j,-2j])>>>jnp.real(x)Array([ 3., 4., -0.], dtype=float32)
Contents
