Mojo 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 asreal
.
Returns:
A new symbolic tensor representing the complex valued tensor comprised from real
and imag
. Each element is paired elementwise.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
😔 What went wrong?