title: Python eigenvalue computations run much slower than those of MATLAB on my computer. Why?
body: <p>I would like to compute the eigenvalues of large-ish matrices (about 1000x1000) using Python 2.6.5. I have been unable to do so quickly. I have not found any other threads addressing this question.</p>
  
  <p>When I run </p>
  
  <pre><code>a = rand(1000,1000);
  tic;
  for i =1:10
      eig(a);
  end
  toc;
  </code></pre>
  
  <p>in MATLAB it takes about 30 seconds. A similar test in Python requires 216 seconds. Running it through R using RPy did not speed up the computation appreciably. A test in Octave took 93 seconds. I am a bit baffled at the difference in speed. </p>
  
  <p>The only instance of a question like this one I can find online is <a href="http://code.activestate.com/lists/python-list/436535/" rel="noreferrer">this</a>, which is several years old. The poster in that question has a different Python directory structure (which I attribute to the age of the post, although I could be mistaken), so I have not been confident enough to attempt to follow the instructions posted by the correspondent.</p>
  
  <p>My package manager says that I have LAPACK installed, and I am using NumPy and SciPy for the Python calculations: </p>
  
  <pre><code>from numpy import *
  from scipy import *
  from numpy.linalg import *
  import time
  
  a = randn(1000,1000)
  tic = time.clock()
  for i in range(0,10):
      eig(a)
  toc = time.clock()
  print "Elapsed time is ", toc-tic
  </code></pre>
  
  <p>I am pretty new to Python, so I may have done something silly. Please let me know if I need to provide any more information. </p>