Function - get_label_count

Function - get_label_count#

openfl.utilities.data_splitters.numpy.get_label_count(labels, label)[source]#

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:

The count of the label in the labels array.

Return type:

int