def test_corrcoef():
    a = np.array([[1, 2, 3, 4], [1, 3, 1, 4], [8, 3, 8, 5]])
r1, p1 = corrcoef(a)
r2, p2 = corrcoef_loop(a)
assert np.allclose(r1, r2)
assert np.allclose(p1, p2)
Correlation coefficients and p values for all pairs of rows of a matrix