[SciPy-user] matrix inversion time (Python vs MATLAB)
Fri Jan 9 11:52:09 CST 2009
> I've made a direct comparison of the time numpy and MATLAB need to
> calculate inverse matrix. Since (as far as I know) both call standard
> packages such as LAPACK internally, I thought that for large matrices
> inversion time should be approximately the same. Contrary to my
> expectations, the difference between Python's numpy.linalg.inv and
> MATLAB actually diverge (with Python being approximately 6 times
> slower than MATLAB for matrices of size 1000).
For such big matrices, you are testing your lapack implementation; at
this point, this has nothing to do with numpy or scipy, unless matlab
and scipy have the same lapack implementation - which is highly
unlikely. One order of magnitude of difference can easily be seen
between LAPACK implementations, specially for matrices/matrices
operations (BLAS level 3).
Which lapack are you using for numpy ?
More information about the SciPy-user