[Numpy-discussion] matrix default to column vector?
Sun Jun 7 18:44:13 CDT 2009
Robert Kern wrote:
> On Sun, Jun 7, 2009 at 04:44, Olivier Verdier <firstname.lastname@example.org> 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.
The function could, with suitable parsing of the argument(s):
(A*B)*C => dot( ((A,B),C) ) or dot( (A,B), C )
A*(B*C) => dot( (A, (B,C)) ) or dot( A, (B,C) )
Effectively, the comma is becoming the operator.
More information about the Numpy-discussion