Re: [Numpy-discussion] NumPy-Discussion Digest, Vol 90, Issue 56
![](https://secure.gravatar.com/avatar/4c0cc9569641ec099a6dc82591d21236.jpg?s=120&d=mm&r=g)
Julian, I can see the need to recognize both column and row vectors, but why not with np.matrix? I can see no need for a new operator and hope to be able to comment more fully on PEP 465 in a few days. Colin W. On 17-Mar-2014 7:19 PM, numpy-discussion-request@scipy.org wrote:
Send NumPy-Discussion mailing list submissions to numpy-discussion@scipy.org
To subscribe or unsubscribe via the World Wide Web, visit http://mail.scipy.org/mailman/listinfo/numpy-discussion or, via email, send a message with subject or body 'help' to numpy-discussion-request@scipy.org
You can reach the person managing the list at numpy-discussion-owner@scipy.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of NumPy-Discussion digest..."
Today's Topics:
1. Re: [help needed] associativity and precedence of '@' (Nathaniel Smith) 2. Re: GSoC project: draft of proposal (Julian Taylor) 3. Re: [help needed] associativity and precedence of '@' (Christophe Bal) 4. Re: [help needed] associativity and precedence of '@' (Alexander Belopolsky) 5. Re: [help needed] associativity and precedence of '@' (Bago) 6. Re: [help needed] associativity and precedence of '@' (Christophe Bal) 7. Re: [help needed] associativity and precedence of '@' (Christophe Bal) 8. Re: [help needed] associativity and precedence of '@' (Nathaniel Smith)
----------------------------------------------------------------------
Message: 1 Date: Mon, 17 Mar 2014 22:02:33 +0000 From: Nathaniel Smith <njs@pobox.com> Subject: Re: [Numpy-discussion] [help needed] associativity and precedence of '@' To: Discussion of Numerical Python <numpy-discussion@scipy.org> Message-ID: <CAPJVwB=zBazN+fiYWJeiWOL=4a9Bf2XGxJGoTT8GFTt-kDUDZw@mail.gmail.com> Content-Type: text/plain; charset=UTF-8
On Mon, Mar 17, 2014 at 9:38 PM, Christophe Bal <projetmbc@gmail.com> wrote:
Here is the translation. ;-)
Hello, and what about something like that ?
a @ b @ c -> (a @ b) @ c a * b @ c -> (a * b) @ c a @ b * c -> a @ (b * c)
Easy to remember: the *-product has priority regarding to the @-product, and we just do @-product from left to right. In the terminology we've been using in this thread, this is "weak-left".
An advantage of this is that most parsers do analyze from left to right.
So I really think that it is a better choice than the weak-right one. We've mostly ignored this option because of assuming that if we want left-associativity, we should go with "same-left" instead of "weak-left". Same-left is:
a @ b @ c -> (a @ b) @ c a * b @ c -> (a * b) @ c a @ b * c -> (a @ b) * c
i.e., even more left-to-right than weak-left :-)
Do you think weak-left is better than same-left?
participants (1)
-
Colin J. Williams