def _U_func_numpy(x1, y1, x2, y2):
 if ((x1 == x2) and (y1 == y2)):
  return 0.0
 r_2 = (((x2 - x1) ** 2) + ((y2 - y1) ** 2))
 return (r_2 * np.log(r_2))

def _U_func_numpy ( x1 , y1 , x2 , y2 ) : if ( ( x1 == x2 ) and ( y1 == y2 ) ) : return 0.0 r_2 = ( ( ( x2 - x1 ) ** 2 ) + ( ( y2 - y1 ) ** 2 ) ) return ( r_2 * np . log ( r_2 ) )
function which implements the u function from bookstein paper .