Skip to main content

Mojo module

complex

Ops that work with complex types.

We don't have a formal complex type yet, so we represent complex numbers as having a final dimension of size 2, representing the real and complex parts respectively.

Functions

  • as_complex: Creates a complex-valued tensor from two real-valued tensors.
  • as_interleaved_complex: Reshapes the input symbolic tensor as complex from alternating (real, imag).
  • as_real: Splits out the real and imaginary components of a symbolic tensor.
  • mul_complex: Multiplies two complex-valued symbolic tensors elementwise.