(labels)
return index_grouped_by_label
Get (an array of) index grouped by label.

  This array is used for label-level sampling.
  It aims at MNIST and CelebA (in Jesse et al. 2018) with 10 labels.

  Args:
    labels: a list of labels in integer.

  Returns:
    A (# label - sized) list of lists contatining indices of that label.
Get (an array of) index grouped by label.
Get ( an array of ) index grouped by label .
def get_index_grouped_by_label(labels):
  """Get (an array of) index grouped by label.

  This array is used for label-level sampling.
  It aims at MNIST and CelebA (in Jesse et al. 2018) with 10 labels.

  Args:
    labels: a list of labels in integer.

  Returns:
    A (# label - sized) list of lists contatining indices of that label.
  """
  index_grouped_by_label = [[] for _ in range(10)]
  for i, label in enumerate(labels):
    index_grouped_by_label[label].append(i)
  return index_grouped_by_label
def get_index_grouped_by_label ( labels ) : index_grouped_by_label = [ [ ] for _ in range ( 10 ) ] for i , label in enumerate ( labels ) : index_grouped_by_label [ label ] . append ( i ) return index_grouped_by_label