Re: [Numpy-discussion] dot() function question

2012-06-28 Thread x . piter
Warren Weckesser warren.weckes...@enthought.com writes: In [6]: a = array([1, -2, 3]) In [7]: outer(a, a) Out[7]: array([[ 1, -2,  3],    [-2,  4, -6],    [ 3, -6,  9]]) Warren Thanks, It is much nicer then my method of adding a zero column. Petro.

Re: [Numpy-discussion] dot() function question

2012-06-28 Thread Chris Barker
On Wed, Jun 27, 2012 at 2:38 PM, x.pi...@gmail.com wrote: How how can I perform matrix multiplication of two vectors? (in matlab I do it like a*a') np.outer is a bit cleaner, I suppose, but you can exactly the same thing you do with matlab if a is a column (single column 2-d array): In [40]:

[Numpy-discussion] dot() function question

2012-06-27 Thread x . piter
Hi list. I have got completely cunfused with the numpy.dot() function. dot(A,B) does: - matrix multiplication if A and B are of MxN and NxK sizey - dot product if A and B are of size M How how can I perform matrix multiplication of two vectors? (in matlab I do it like a*a') Thanks. Petro.

Re: [Numpy-discussion] dot() function question

2012-06-27 Thread Warren Weckesser
On Wed, Jun 27, 2012 at 4:38 PM, x.pi...@gmail.com wrote: Hi list. I have got completely cunfused with the numpy.dot() function. dot(A,B) does: - matrix multiplication if A and B are of MxN and NxK sizey - dot product if A and B are of size M How how can I perform matrix multiplication of