> > right-associative and place it just above (more tightly binding) than
> >
> > *. But I'll poll numpy-discussion and friends and see if anyone has
> > ideas for more objective measures.
> >
>
> I guess a common case would be a*B@x, where a is a scalar. Is it more
> efficient or numerically stable to evaluate that one way or the other?
I'm not a numerical linear algebra expert, but I disagree.
If your matrix code needs to be optimized, there's no way around thinking about your specific situation.
Optimizing matrix expressions is a tricky problem.
http://en.wikipedia.org/wiki/Matrix_chain_multiplicationhttp://www.youtube.com/watch?v=nVt24G_2VC0
If you want a different order use parenthesis, or build a symbolic expression.
I don't think either choice of priority, or associativity will be the
right often enough be worth an affront to the "principal of least
surprise".
Things are nice and clear the way they are.
"""The binary arithmetic operations have the conventional priority levels... Apart
from the power operator[s], there are only two levels, one for multiplicative
operators and one for additive operators"""
let's keep it like this: Vote P/E/MD/AS not P/E/M/MD/AS.
I think that if there is a reason to change is Greg is on the right track:
>Greg Ewing
greg.ewing at canterbury.ac.nz
>Sat Mar 15 12:55:09 CET 2014>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.