[Python-ideas] [RFC] draft PEP: Dedicated infix operators for matrix multiplication and matrix power

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Mar 15 12:55:09 CET 2014


Antoine Pitrou wrote:

> The possible reason given in the PEP is very weak and amounts to
> premature optimization:

I don't think it's just a matter of optimization. Often,
matrix @ vector represents a linear operator acting on an
element of a vector space. When you chain them,

    A @ B @ C @ v

conceptually represents acting on v with C, then B,
then A.

-- 
Greg


More information about the Python-ideas mailing list