def euclidean_distance(u, v):
 diff = (u - v)
 return sqrt(numpy.dot(diff, diff))

def euclidean_distance ( u , v ) : diff = ( u - v ) return sqrt ( numpy . dot ( diff , diff ) )
returns the euclidean distance between vectors u and v .