def paired_cosine_distances(X, Y):
 (X, Y) = check_paired_arrays(X, Y)
 return (0.5 * row_norms((normalize(X) - normalize(Y)), squared=True))

def paired_cosine_distances ( X , Y ) : ( X , Y ) = check_paired_arrays ( X , Y ) return ( 0.5 * row_norms ( ( normalize ( X ) - normalize ( Y ) ) , squared = True ) )
computes the paired cosine distances between x and y read more in the :ref:user guide <metrics> .