fatf.utils.distances.binary_point_distance(y, X, **kwargs)[source]

Calculates the binary distance between y and every row of X.

y has to be a 1-dimensional numpy array or a row of a structured numpy array (i.e. numpy’s void) and X has to be a 2-dimensional numpy array. The length of y has to be the same as the width of X.

Either of the input arrays is not of a base dtype. (See fatf.utils.array.validation.is_base_array function description for the explanation of a base dtype.)

yUnion[numpy.ndarray, numpy.void]

A numpy array (has to be 1-dimensional) used to calculate the distances from.


A numpy array (has to be 2-dimensional) to which rows the distances are calculated.


Keyword arguments that are passed to the fatf.utils.distances.binary_distance function responsible for calculating the binary distance.


An array of binary distances between y and every row of X.


Either y is not 1-dimensional or X is not 2-dimensional or the length of y is not equal to the number of columns in X.