[Numpy-discussion] matrix default to column vector?

Olivier Verdier zelbier at gmail.com
Mon Jun 8 09:58:25 EDT 2009


Is this lack of associativity really *always* such a huge issue? I can
imagine many situations where it is not. One just want to compute A*B*C,
without any particular knowing of whether A*(B*C) or (A*B)*C is best.
If the user is allowed to blindly use A*B*C, I don't really see why he
wouldn't be allowed to use dot(A,B,C) with the same convention... One should
realize that allowing dot(A,B,C) is just *better* than the present situation
where the user is forced into writing dot(dot(A,B),C) or dot(A,dot(B,C)).
One does not remove any liberty from the user. He may always switch back to
one of the above forms if he really knows which is best for him. So I fail
to see exactly where the problem is...

== Olivier

2009/6/7 Robert Kern <robert.kern at gmail.com>

> On Sun, Jun 7, 2009 at 04:44, Olivier Verdier <zelbier at gmail.com> wrote:
> > Yes, I found the thread you are referring
> > to: http://mail.python.org/pipermail/python-dev/2008-July/081554.html
> > However, since A*B*C exists for matrices and actually computes (A*B)*C,
> why
> > not do the same with dot? I.e. why not decide that dot(A,B,C) does what
> > would A*B*C do, i.e., dot(dot(A,B),C)?
> > The performance and precision problems are the responsability of the
> user,
> > just as with the formula A*B*C.
>
> I'm happy to make the user responsible for performance and precision
> problems if he has the tools to handle them. The operator gives the
> user the easy ability to decide the precedence with parentheses. The
> function does not.
>
> --
> Robert Kern
>
> "I have come to believe that the whole world is an enigma, a harmless
> enigma that is made terrible by our own mad attempt to interpret it as
> though it had an underlying truth."
>  -- Umberto Eco
> _______________________________________________
> 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/20090608/35f7c9fe/attachment.html>


More information about the NumPy-Discussion mailing list