def minkowski_distance(x, y, p=2):
 x = np.asarray(x)
 y = np.asarray(y)
 if ((p == np.inf) or (p == 1)):
  return minkowski_distance_p(x, y, p)
 else:
  return (minkowski_distance_p(x, y, p) ** (1.0 / p))

def minkowski_distance ( x , y , p = 2 ) : x = np . asarray ( x ) y = np . asarray ( y ) if ( ( p == np . inf ) or ( p == 1 ) ) : return minkowski_distance_p ( x , y , p ) else : return ( minkowski_distance_p ( x , y , p ) ** ( 1.0 / p ) )
compute the l**p distance between two arrays .