title: Finding the correlation matrix
body: <p>I have a matrix which is fairly large (around 50K rows), and I want to print the correlation coefficient between each row in the matrix. I have written Python code like this:</p>
  
  <pre><code>for i in xrange(rows): # rows are the number of rows in the matrix. 
      for j in xrange(i, rows):
          r = scipy.stats.pearsonr(data[i,:], data[j,:])
          print r  
  </code></pre>
  
  <p>Please note that I am making use of the <code>pearsonr</code> function available from the scipy module (<a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html" rel="noreferrer">http://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.pearsonr.html</a>).</p>
  
  <p>My question is: Is there a quicker way of doing this? Is there some matrix partition technique that I can use?</p>
  
  <p>Thanks!       </p>