def obrientransform(*args):
 TINY = np.sqrt(np.finfo(float).eps)
 arrays = []
 for arg in args:
  a = np.asarray(arg)
  n = len(a)
  mu = np.mean(a)
  sq = ((a - mu) ** 2)
  sumsq = sq.sum()
  t = (((((n - 1.5) * n) * sq) - (0.5 * sumsq)) / ((n - 1) * (n - 2)))
  var = (sumsq / (n - 1))
  if (abs((var - np.mean(t))) > TINY):
   raise ValueError('Lack of convergence in obrientransform.')
  arrays.append(t)
 return np.array(arrays)

def obrientransform ( * args ) : TINY = np . sqrt ( np . finfo ( float ) . eps ) arrays = [ ] for arg in args : a = np . asarray ( arg ) n = len ( a ) mu = np . mean ( a ) sq = ( ( a - mu ) ** 2 ) sumsq = sq . sum ( ) t = ( ( ( ( ( n - 1.5 ) * n ) * sq ) - ( 0.5 * sumsq ) ) / ( ( n - 1 ) * ( n - 2 ) ) ) var = ( sumsq / ( n - 1 ) ) if ( abs ( ( var - np . mean ( t ) ) ) > TINY ) : raise ValueError ( 'Lack of convergence in obrientransform.' ) arrays . append ( t ) return np . array ( arrays )
computes the obrien transform on input data .