complex_value

static OperationNamespace.complex_value(real, imag, *, name=None)

Creates a complex number from real and imaginary parts.

Parameters
  • real (float or np.ndarray or Tensor) – The real part, \(a\).

  • imag (float or np.ndarray or Tensor) – The imaginary part, \(b\).

  • name (str, optional) – The name of the node.

Returns

The complex number \(a+ib\) element-wise.

Return type

Tensor