@tf_export('math.real', v1=['math.real', 'real'])
@deprecation.deprecated_endpoints('real')
@dispatch.add_dispatch_support
def real(input, name=None):
    'Returns the real part of a complex (or real) tensor.\n\n  Given a tensor `input`, this operation returns a tensor of type `float` that\n  is the real part of each element in `input` considered as a complex number.\n\n  For example:\n\n  ```python\n  x = tf.constant([-2.25 + 4.75j, 3.25 + 5.75j])\n  tf.real(x)  # [-2.25, 3.25]\n  ```\n\n  If `input` is already real, it is returned unchanged.\n\n  Args:\n    input: A `Tensor`. Must have numeric type.\n    name: A name for the operation (optional).\n\n  Returns:\n    A `Tensor` of type `float32` or `float64`.\n  '
    with ops.name_scope(name, 'Real', [input]) as name:
        if input.dtype.is_complex:
            real_dtype = input.dtype.real_dtype
            return gen_math_ops.real(input, Tout=real_dtype, name=name)
        else:
            return input
Returns the real part of a complex (or real) tensor.

Given a tensor `input`, this operation returns a tensor of type `float` that
is the real part of each element in `input` considered as a complex number.

For example:

```python
x = tf.constant([-2.25 + 4.75j, 3.25 + 5.75j])
tf.real(x)  # [-2.25, 3.25]
```

If `input` is already real, it is returned unchanged.

Args:
  input: A `Tensor`. Must have numeric type.
  name: A name for the operation (optional).

Returns:
  A `Tensor` of type `float32` or `float64`.
@tf_export('math.real', v1=['math.real', 'real'])
@deprecation.deprecated_endpoints('real')
@dispatch.add_dispatch_support
def real(input, name=None):
    'Returns the real part of a complex (or real) tensor.\n\n  Given a tensor `input`, this operation returns a tensor of type `float` that\n  is the real part of each element in `input` considered as a complex number.\n\n  For example:\n\n  ```python\n  x = tf.constant([-2.25 + 4.75j, 3.25 + 5.75j])\n  tf.real(x)  # [-2.25, 3.25]\n  ```\n\n  If `input` is already real, it is returned unchanged.\n\n  Args:\n    input: A `Tensor`. Must have numeric type.\n    name: A name for the operation (optional).\n\n  Returns:\n    A `Tensor` of type `float32` or `float64`.\n  '
    with ops.name_scope(name, 'Real', [input]) as name:
        if input.dtype.is_complex:
            real_dtype = input.dtype.real_dtype
            return gen_math_ops.real(input, Tout=real_dtype, name=name)
        else:
            return input