Skip to main content
Log in

Mojo function

as_real

as_real(complex: Symbol) -> List[Symbol]

Splits out the real and imaginary components of a symbolic tensor.

Args:

  • complex (Symbol): The input complex-valued symbolic tensor.

Returns:

A pair of real-valued symbolic tensors, each with the same shape and rank as the input tensor, except the last dim of size 2 is removed. The first represents the real part of the input tensor, and the the second represents the imaginary part.