def decompose_covariance(c):
<EOL>c = _n.array(c)<EOL>e = []<EOL>for n in range(<NUM_LIT:0>, len(c[<NUM_LIT:0>])): e.append(_n.sqrt(c[n][n]))<EOL>for n in range(<NUM_LIT:0>, len(c[<NUM_LIT:0>])):<EOL><INDENT>for m in range(<NUM_LIT:0>, len(c[<NUM_LIT:0>])):<EOL><INDENT>c[n][m] = c[n][m] / (e[n]*e[m])<EOL><DEDENT><DEDENT>return [_n.array(e), _n.array(c)]<EOL>
This decomposes a covariance matrix into an error vector and a correlation matrix