fatf.utils.data.tools.validate_indices_per_bin

fatf.utils.data.tools.validate_indices_per_bin(indices_per_bin: List[List[int]]) → bool[source]

Validates a list of binned indices.

Parameters
indices_per_binList[List[integer]]

A list of lists with the latter one holding row indices of a particular group.

Returns
is_validboolean

True if the input is valid, False otherwise.

Raises
TypeError

The indices_per_bin parameter is not a list, one of the elements of the indices_per_bin list is not a list or one of the elements of the latter list is not an integer.

ValueError

The indices_per_bin list is empty. Some of the indices are duplicated or are negative integers.

Warns
UserWarning

Some of the indices may be missing – gaps in the consecutive list of indices were found.