tfmri.math.extract_from_complex

extract_from_complex(tensor, part, name='extract_from_complex')[source]

Extract parts from a complex tensor.

Parameters
  • tensor – A Tensor. Must have type float32, float64, complex64 or complex128.

  • part – A string. The part of the complex number to extract. Must be one of "real", "imag", "magnitude", "phase".

  • name – An optional string. The name of the op.

Returns

A Tensor. The extracted part. Has the same shape as tensor and type tensor.dtype.real_dtype.