On Sat, Mar 15, 2014 at 1:28 PM, Nathaniel Smith <njs@pobox.com> wrote:

I was going to ask this earlier, but I was worried I was missing something major.

On Sat, Mar 15, 2014 at 3:41 AM, Nathaniel Smith <njs@pobox.com> wrote:

> Hi all,Another data point that might be useful:

>

> Here's the main blocker for adding a matrix multiply operator '@' to Python:

> we need to decide what we think its precedence and associativity should be.

Matlab: same-left

R: tight-left

Why was "tight-left" not an option?

This means that if you don't use parentheses, you get:

a @ b @ c -> (a @ b) @ c

a * b @ c -> a * (b @ c)

a @ b * c -> (a @ b) * c

This means that if you don't use parentheses, you get:

a @ b @ c -> (a @ b) @ c

a * b @ c -> a * (b @ c)

a @ b * c -> (a @ b) * c

In my (very inexperienced) opinion, it seems like the most intuitive option.

Cheers,

Cheers,

-Joe

IDL: same-left

GAUSS: same-left (IIUC -- any GAUSS experts please correct me if I

misunderstood the fine manual)

Mathematica: instead of having an associativity, a @ b @ c gets

converted into mdot([a, b, c])

--

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