[Numpy-discussion] how to multiply the rows of a matrix by a different number?

Jose Borreguero borreguero@gmail....
Tue Mar 3 19:53:00 CST 2009


I guess there has to be an easy way for this. I have:
M.shape=(10000,3)
N.shape=(10000,)

I want to do this:
for i in range(10000):
M[i]*=N[i]
without the explicit loop


-Jose
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://projects.scipy.org/pipermail/numpy-discussion/attachments/20090303/c260eea5/attachment.html 


More information about the Numpy-discussion mailing list