[Numpy-discussion] matrix default to column vector?
Olivier Verdier
zelbier at gmail.com
Mon Jun 8 13:12:43 EDT 2009
2009/6/8 Christopher Barker <Chris.Barker at noaa.gov>
> Olivier Verdier wrote:
> > 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)).
>
> I'm lost now -- how is this better in any significant way?
Well, allowing dot(A,B,C) does not remove any other possibility does it?
That is what I meant by "better". It just gives the user an extra
possibility. What would be wrong with that? Especially since matrix users
already can write A*B*C.
I won't fight for this though. I personally don't care but I think that it
would remove the last argument for matrices against arrays, namely the fact
that A*B*C is easier to write than dot(dot(A,B),C). I don't understand why
it would be a bad idea to implement this dot(A,B,C).
> Tom K. wrote:
> > But,
> > almost all experienced users drift away from matrix toward array as they
> > find the matrix class too limiting or strange
>
> That's one reason, and the other is that when you are doing real work,
> it is very rare for the linear algebra portion to be significant. I know
> in my code (and this was true when I was using MATLAB too), I may have
> 100 lines of code, and one of them is a linear algebra expression that
> could be expressed nicely with matrices and infix operators. Given that
> the rest of the code is more natural with nd-arrays, why the heck would
> I want to use matrices? this drove me crazy with MATLAB -- I hated the
> default matrix operators, I was always typing ".*", etc.
This exactly agrees with my experience too.
== Olivier
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20090608/a5456ea2/attachment.html>
More information about the NumPy-Discussion
mailing list