Re: [Numpy-discussion] speed of array vs matrix

2010-10-25 Thread Citi, Luca
Thank you for your replies. I might just use arrays. Maybe in the future something like pypy might help reduce the python overhead. Best, Luca ___ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discus

Re: [Numpy-discussion] speed of array vs matrix

2010-10-25 Thread Keith Goodman
On Mon, Oct 25, 2010 at 6:48 AM, Citi, Luca wrote: > Hello, > I have noticed a significant speed difference between the array and the > matrix implementation of the dot product, especially for not-so-big matrices. > For example: > > In [1]: import numpy as np > In [2]: b = np.random.rand(104,1) >

Re: [Numpy-discussion] speed of array vs matrix

2010-10-25 Thread Charles R Harris
On Mon, Oct 25, 2010 at 7:48 AM, Citi, Luca wrote: > Hello, > I have noticed a significant speed difference between the array and the > matrix implementation of the dot product, especially for not-so-big > matrices. > For example: > > In [1]: import numpy as np > In [2]: b = np.random.rand(104,1)

[Numpy-discussion] speed of array vs matrix

2010-10-25 Thread Citi, Luca
Hello, I have noticed a significant speed difference between the array and the matrix implementation of the dot product, especially for not-so-big matrices. For example: In [1]: import numpy as np In [2]: b = np.random.rand(104,1) In [3]: bm = np.mat(b) In [4]: a = np.random.rand(8, 104) In [5]: