don't understand matrix-multiplication should be reversed in python?

Gregory Ewing greg.ewing at canterbury.ac.nz
Fri Nov 13 19:12:24 EST 2015


Dave Farrance wrote:
> Yep, he's evidently used to the Matlab/Octave way of defining "vectors"
> which is somewhat easier for a math-oriented interactive environment.
> 
> It's just a *bit* more laborious to append columns in numpy.

Yes, that's probably the main reason to do things that way.
A collection of vectors is most conveniently represented as
a 2D array where the first index selects one of the vectors.
But then to apply a transformation matrix to all the vectors,
you need to transpose the matrix and multiply it on the
right.

-- 
Greg



More information about the Python-list mailing list