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

  Uses `tf.imag`.

  Args:
    a: 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 imaginary parts of all elements in `a`.
Returns imaginary parts of all elements in a .
def imag(a):
  """Returns imaginary parts of all elements in `a`.

  Uses `tf.imag`.

  Args:
    a: 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`.
  """
  a = asarray(a)
  # TODO(srbs): np.imag returns a scalar if a is a scalar, whereas we always
  # return an ndarray.
  return utils.tensor_to_ndarray(tf.math.imag(a.data))
def imag ( a ) : a = asarray ( a ) # TODO(srbs): np.imag returns a scalar if a is a scalar, whereas we always # return an ndarray. return utils . tensor_to_ndarray ( tf . math . imag ( a . data ) )