def standardize_data(data, mu=0.0, sigma=1.0):
  """
  Rescales the input subtracting mu and dividing by sigma.

  Args:
    data (numpy.ndarray): data to be standardized.
    mu (float)
    sigma (float)
  Returns:
    numpy.ndarray: standardized data
  """
  data -= mu
  data /= sigma
  return data