Function complex

  • Creates a complex tensor with the given real and imaginary components.

    Parameters

    • real: number | number[] | Tensor

      the real component(s)

    • imag: number | number[] | Tensor

      the imaginary component(s)

    Returns Tensor

    the complex tensor