title: Numpy corrcoef error
body: <p>I'm now learning Subspace method to categorize handwritten numbers. 
  Subspace method needs a self-correlation matrix, and I found <code>np.corrcoef()</code> can compute that.</p>
  
  <p>In the documentation of <code>np.corrcoef()</code>, it says "each row represents a variable, with observations in the columns" by default. So, I transpose my input data since each row is an observation (4132 obs, 784 vars).</p>
  
  <p>However, the function returns an array with info or NaNs with the transposing. Then, I can't compute eigenvalue and eigenvector.</p>
  
  <p>Without transposing, I can compute perfectly, but that's not I want (a (4132,4132) shape array). I don't understand why this happens.</p>
  
  <p>Here's my code:</p>
  
  <pre><code>X = train[train["label"]==i].iloc[:,1:] 
  C = np.corrcoef(X.T)
  print(np.isnan(np.min(C))) #-&gt; print True if there are Nan values
  eig_val,eig_vec = linalg.eigh(C) #-&gt; returns ValueError
  print(eig_val.shape,eig_vec.shape)
  </code></pre>
  
  <p>X is like this (4132row,785 columns)</p>
  
  <p><a href="https://i.stack.imgur.com/BthYG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/BthYG.png" alt="Example of X"></a></p>
  
  <p><a href="https://i.stack.imgur.com/uNmS1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/uNmS1.png" alt="Example of image"></a></p>