openfl.utilities.data_splitters.numpy.get_label_count

openfl.utilities.data_splitters.numpy.get_label_count(labels, label)

Count the number of samples with a specific label in a labels array.

Parameters:
  • labels (np.ndarray) – Array of labels.

  • label (int or str) – The label to count.

Returns:

int – The count of the label in the labels array.