• Converts two real numbers to a complex number.

    Given a tensor real representing the real part of a complex number, and a tensor imag representing the imaginary part of a complex number, this operation returns complex numbers elementwise of the form [r0, i0, r1, i1], where r represents the real part and i represents the imag part.

    The input tensors real and imag must have the same shape.

    const real = tf.tensor1d([2.25, 3.25]);
    const imag = tf.tensor1d([4.75, 5.75]);
    const complex = tf.complex(real, imag);

    complex.print();

    Type Parameters

    Parameters

    Returns T

    Doc

Generated using TypeDoc