def minkowski(u, v, p):
 u = _validate_vector(u)
 v = _validate_vector(v)
 if (p < 1):
  raise ValueError('p must be at least 1')
 dist = norm((u - v), ord=p)
 return dist

def minkowski ( u , v , p ) : u = _validate_vector ( u ) v = _validate_vector ( v ) if ( p < 1 ) : raise ValueError ( 'p must be at least 1' ) dist = norm ( ( u - v ) , ord = p ) return dist
computes the minkowski distance between two 1-d arrays .