On Tue, Mar 18, 2014 at 12:16 AM, Christophe Bal <projet...@gmail.com> wrote: >>>> >>> I think that weak-left is a little strange, just think >>>> >>> a little of the operators used by mathematicians that >>>> >>> always follow a hierarchy. > >>>> Not sure what you mean -- I don't think most mathematicians >>>> think that scalar and matrix multiplication are above or below >>>> each other in precedence, for example. > > You're right but on the other hand, I've never seen mixed use of matrix and > scalar products without parenthesis... Indeed in math, we can use < Au , Bv >> for the scalar product of two matrix-vector products.
Not scalar product, scalar multiplication -- you're saying (I think) that 3 * Matrix1 * Matrix2 is just like 3 * Matrix1 + Matrix2 in the sense that mathematicians think of the 3 * Matrix1 part is very different from, and higher precedence than, the Matrix1 + Matrix2 part. And similarly that Matrix1 * Matrix2 * 3 is just like Matrix1 + Matrix2 * 3 But in fact I think if you asked most mathematicians which of the "*"'s in Matrix1 * Matrix2 * 3 is higher precedence, they would think this question very odd! -n -- Nathaniel J. Smith Postdoctoral researcher - Informatics - University of Edinburgh http://vorpus.org _______________________________________________ NumPy-Discussion mailing list NumPy-Discussion@scipy.org http://mail.scipy.org/mailman/listinfo/numpy-discussion