Re: [Numpy-discussion] array vector elementwise multiplication

2009-02-03 Thread Charles R Harris
On Tue, Feb 3, 2009 at 10:19 AM, Gideon Simpson wrote: > I have an M x N matrix A and two vectors, an M dimensional vector x > and an N dimensional vector y. I would like to be able to do two > things. > > 1. Multiply, elementwise, every column of A by x > > 2. Multiply, elementwise, every row

[Numpy-discussion] array vector elementwise multiplication

2009-02-03 Thread Gideon Simpson
I have an M x N matrix A and two vectors, an M dimensional vector x and an N dimensional vector y. I would like to be able to do two things. 1. Multiply, elementwise, every column of A by x 2. Multiply, elementwise, every row of A by y. What's the "quick" way to do this in numpy? -gideon