inFairness.utils.validationutils module#

inFairness.utils.validationutils.is_tensor_binary(data: ndarray)[source]#

Checks if the data is binary (0/1) or not. Return True if it is binary data

Parameters:

data (np.ndarray) – Data to validata if binary or not

Returns:

is_binary – True if data is binary. False if not

Return type:

bool