[Numpy-discussion] Translation of a Matlab expresion

Pierre GM pgmdevlist@gmail....
Mon Apr 9 11:47:36 CDT 2007

On Monday 09 April 2007 06:28:33 Miquel Poch wrote:

> T is a matrix and the rest of the variables are floats. I don't know why
> are this '.' in the expresion, and that's why I can't translate it.


The .* means: element-wise multiplitcation.

> I tried to do it without the '.' but then the expression it's incorrect. We
> can't multiply two matrix wich number of rows and columns are the same.
> ''' exceptions.ValueError : objects are not aligned '''

Use numpy.multiply, or don't use matrices at all, just plain ndarrays.

More information about the Numpy-discussion mailing list