[Numpy-discussion] [help needed] associativity and precedence of '@'

Christophe Bal projetmbc at gmail.com
Tue Mar 18 13:31:54 EDT 2014


This is a different situation because / is indeed an hidden multiplication
: a/b = a*inv(b). The same is true for + and - : a-b=a+opp(b). What I'm
saying is that these operations * and / are indeed of the very same j-kind.

This is not the same for * and @.


2014-03-18 17:53 GMT+01:00 Nathaniel Smith <njs at pobox.com>:

> On Tue, Mar 18, 2014 at 3:22 PM, Christophe Bal <projetmbc at gmail.com>
> wrote:
> > About weak-left. You need to define a priority of @ the matrix product
> > regarding to * the elementwise product because (A*B)@C <> A*(B at C)
>
> This doesn't follow.  (a / b) * c != a / (b * c), but / and * in
> Python have the same priority.
>
> --
> Nathaniel J. Smith
> Postdoctoral researcher - Informatics - University of Edinburgh
> http://vorpus.org
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion at scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20140318/a9085517/attachment.html>


More information about the NumPy-Discussion mailing list