At Thursday 24/8/2006 12:38, Paul Johnston wrote:
from numpy import *
a = array([[1,2,3],[4,5,6],[1,2,3]])
b = array([[1,3,6],[2,5,1],[1,1,1]])
print "a * b is \n", a * b
I know its a long time since my degree but that's not matrix
multiplication is it ?
No, it's plain element-by-element multiplication.
You want matrixmultiply:
http://numpy.scipy.org/numpydoc/numpy-9.html#pgfId-36542
Gabriel Genellina
Softlab SRL
__________________________________________________
Preguntá. Respondé. Descubrí.
Todo lo que querías saber, y lo que ni imaginabas,
está en Yahoo! Respuestas (Beta).
¡Probalo ya!
http://www.yahoo.com.ar/respuestas
--
http://mail.python.org/mailman/listinfo/python-list