jax.lax.real#

jax.lax.real(x)[source]#

Elementwise extract real part: \(\mathrm{Re}(x)\).

This function lowers directly to the stablehlo.real operation.

Parameters:

x (ArrayLike) – input array. Must have complex dtype.

Returns:

Array of the same shape as x containing its real part. Will have dtype float32 if x.dtype == complex64, or float64 if x.dtype == complex128.

Return type:

Array

See also