[Numpy-discussion] A basic question on the dot function
Tue Oct 16 13:20:49 CDT 2007
On 10/17/07, Julien Hillairet <firstname.lastname@example.org> wrote:
> First of all, I'm sorry if this question had already been asked. I've
> searched on the gmane archive and elsewhere on internet, but I didn't found
> the answer to my question.
> As expected, the dot product of 2 'classical' vectors works fine :
> In : a0 = numpy.array([1,2,3])
> In : numpy.dot(a0,a0)
> Out: 14
> What I don't understand, is why the dot product of a (3,N) vector gives an
> error :
dot() also serves as Numpy's matrix multiply function. So it's trying
to interpret that as a (3,N) matrix times a (3,N) matrix.
See examples here:
More information about the Numpy-discussion