title: SVD MemoryError in Python
body: <p>I want to perform an SVD on a big array <code>M[159459,159459]</code>. </p>
  
  <p>Since SVD computation depends on the input matrix of shape <code>(159459,159459)</code>, this <a href="https://stackoverflow.com/questions/7143723/applying-svd-throws-a-memory-error-instantaneously">here</a> does not address my goal.</p>
  
  <p>I have tried to use:</p>
  
  <ul>
  <li><code>scipy.linalg.svd</code></li>
  <li><code>scipy.linalg.svd(check_finite=False)</code></li>
  <li>change the driver to <code>lapack_driver='gesvd</code></li>
  <li><code>numpy.linalg.svd</code></li>
  </ul>
  
  <p>However, I always get a MemoryError. Finally, I want to compute the full SVD, because I want to perform a <a href="https://en.wikipedia.org/wiki/Orthogonal_Procrustes_problem" rel="nofollow noreferrer">Procrustes</a> analysis, i.e. if <strong>M</strong> is the matrix that I have now, I need <strong><code>M = USV'</code></strong></p>
  
  <pre><code>import numpy as np
  from scipy import linalg
  
  #M = np.load("M.npy")
  M = np.random.rand(159459,159459)
  U, s, Vh = linalg.svd(M, check_finite=False, lapack_driver='gesvd)
  </code></pre>
  
  <p>Everything fails.</p>
  
  <p>My system details: </p>
  
  <blockquote>
    <p><code>$ cat /proc/meminfo</code><br>
    <code>MemTotal:     527842404 kB</code><br>
    <code>MemFree:      523406068 kB</code><br>
    <code>MemAvailable: 521659112 kB</code></p>
  </blockquote>