def fisher_z_transform(r):
 if (abs(r) >= 1):
  return nan
 return (0.5 * log(((1.0 + r) / (1.0 - r))))

def fisher_z_transform ( r ) : if ( abs ( r ) >= 1 ) : return nan return ( 0.5 * log ( ( ( 1.0 + r ) / ( 1.0 - r ) ) ) )
calculate the fisher z transform of a correlation coefficient .