[Numpy-discussion] Should dot return 1x1 matrix as scalar?

Travis Oliphant oliphant at ee.byu.edu
Fri Jan 13 09:10:01 CST 2006

Paulo J. S. Silva wrote:

>Obs: Actually I found the "problem" when implementing a QR decomposition
>based on Householder reflections and comparing it to a Matlab code.
>Numpy is only 10% slower than Matlab in this code. Man, I'll love to
>give my numerical linear algebra course this year using Python instead
>of Matlab/Octave.
I would be interested to see how a raw-array solution compares.  There 
is going to be some overhead of using a subclass, because of the 
attribute lookups that occur on all array creations and because the 
subclass is written in Python that could be on the order of 10%.

Quantifying the subclass slow-down would be useful...  Also, which BLAS 
are you using?


More information about the Numpy-discussion mailing list