(val)
return utils.tensor_to_ndarray(tf.math.real(val.data))
Returns real parts of all elements in `a`.

  Uses `tf.real`.

  Args:
    val: array_like. Could be an ndarray, a Tensor or any object that can
      be converted to a Tensor using `tf.convert_to_tensor`.

  Returns:
    An ndarray with the same shape as `a`.
Returns real parts of all elements in `a`.
Returns real parts of all elements in a .
def real(val):
  """Returns real parts of all elements in `a`.

  Uses `tf.real`.

  Args:
    val: array_like. Could be an ndarray, a Tensor or any object that can
      be converted to a Tensor using `tf.convert_to_tensor`.

  Returns:
    An ndarray with the same shape as `a`.
  """
  val = asarray(val)
  # TODO(srbs): np.real returns a scalar if val is a scalar, whereas we always
  # return an ndarray.
  return utils.tensor_to_ndarray(tf.math.real(val.data))
def real ( val ) : val = asarray ( val ) # TODO(srbs): np.real returns a scalar if val is a scalar, whereas we always # return an ndarray. return utils . tensor_to_ndarray ( tf . math . real ( val . data ) )