[Numpy-discussion] matrix indexing question
Bill Baxter
wbaxter at gmail.com
Fri Mar 30 00:10:36 EDT 2007
On 3/30/07, Timothy Hochberg <tim.hochberg at ieee.org> wrote:
> Note, however that you can't (for instance) multiply column vector with
> a row vector:
>
> >>> (c)(r)
> Traceback (most recent call last):
> ...
> TypeError: Cannot matrix multiply columns with anything
>
That should be allowed. (N,1)*(1,M) is just an (N,M) matrix with
entries C[i,j] = A[i,0]*B[0,]
I kind of like the idea of using call for multiply, though. If it
doesn't turn out to have any major down sides it could be a good way
to give ndarray a concise syntax for "dot".
--bb
More information about the NumPy-Discussion
mailing list