def correlation(a, b):
diff1 = a - a.mean()<EOL>diff2 = b - b.mean()<EOL>return (diff1 * diff2).mean() / (np.sqrt(np.square(diff1).mean() * np.square(diff2).mean()))<EOL>
Computes the correlation between a and b, says the Pearson's correlation
    coefficient R