fatf.utils.distances.euclidean_distance

fatf.utils.distances.euclidean_distance(x, y)[source]

Calculates the Euclidean distance between two 1-dimensional numpy “arrays”.

Each of the input arrays can be either a 1D numpy array or a row of a structured numpy array, i.e. numpy’s void.

Parameters
xUnion[numpy.ndarray, numpy.void]

The first numpy array (has to be 1-dimensional and purely numerical).

yUnion[numpy.ndarray, numpy.void]

The second numpy array (has to be 1-dimensional and purely numerical).

Returns
distancefloat

Euclidean distance between the two numpy arrays.

Raises
IncorrectShapeError

Either of the input arrays is not 1-dimensional or they are not of the same length.

ValueError

Either of the input arrays is not purely numerical.