function complex_(real, imag) {
    const $real = (0, _tensorUtilEnv.convertToTensor)(real, "real", "complex");
    const $imag = (0, _tensorUtilEnv.convertToTensor)(imag, "imag", "complex");
    _util.assertShapesMatch($real.shape, $imag.shape, `real and imag shapes, ${$real.shape} and ${$imag.shape}, ` + `must match in call to tf.complex().`);
    const inputs = {
        real: $real,
        imag: $imag
    };
    return (0, _engine.ENGINE).runKernel((0, _kernelNames.Complex), inputs);
}
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.

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

complex.print();
```

@doc {heading: 'Tensors', subheading: 'Creation'}