def check_increasing(x, y):
 (rho, _) = spearmanr(x, y)
 increasing_bool = (rho >= 0)
 if (rho not in [(-1.0), 1.0]):
  F = (0.5 * math.log(((1.0 + rho) / (1.0 - rho))))
  F_se = (1 / math.sqrt((len(x) - 3)))
  rho_0 = math.tanh((F - (1.96 * F_se)))
  rho_1 = math.tanh((F + (1.96 * F_se)))
  if (np.sign(rho_0) != np.sign(rho_1)):
   warnings.warn('Confidence interval of the Spearman correlation coefficient spans zero. Determination of ``increasing`` may be suspect.')
 return increasing_bool

def check_increasing ( x , y ) : ( rho , _ ) = spearmanr ( x , y ) increasing_bool = ( rho >= 0 ) if ( rho not in [ ( - 1.0 ) , 1.0 ] ) : F = ( 0.5 * math . log ( ( ( 1.0 + rho ) / ( 1.0 - rho ) ) ) ) F_se = ( 1 / math . sqrt ( ( len ( x ) - 3 ) ) ) rho_0 = math . tanh ( ( F - ( 1.96 * F_se ) ) ) rho_1 = math . tanh ( ( F + ( 1.96 * F_se ) ) ) if ( np . sign ( rho_0 ) != np . sign ( rho_1 ) ) : warnings . warn ( 'Confidence interval of the Spearman correlation coefficient spans zero. Determination of ``increasing`` may be suspect.' ) return increasing_bool
determine whether y is monotonically correlated with x .