Skip to main content

function

as_complex

as_complex(real: Symbol, imag: Symbol) -> Symbol

Creates a complex-valued tensor from two real-valued tensors.

Args:

  • real (Symbol): A symbolic tensor representing the real part of the complex value.
  • imag (Symbol): A symbolic tensor representing the imaginary part of the complex value. Must have the same shape and dtype as real.

Returns:

A new symbolic tensor representing the complex valued tensor comprised from real and imag. Each element is paired elementwise.