def check_paired_arrays(X, Y):
 (X, Y) = check_pairwise_arrays(X, Y)
 if (X.shape != Y.shape):
  raise ValueError(('X and Y should be of same shape. They were respectively %r and %r long.' % (X.shape, Y.shape)))
 return (X, Y)

def check_paired_arrays ( X , Y ) : ( X , Y ) = check_pairwise_arrays ( X , Y ) if ( X . shape != Y . shape ) : raise ValueError ( ( 'X and Y should be of same shape. They were respectively %r and %r long.' % ( X . shape , Y . shape ) ) ) return ( X , Y )
set x and y appropriately and checks inputs for paired distances all paired distance metrics should use this function first to assert that the given parameters are correct and safe to use .