dot products

Steven Bethard steven.bethard at gmail.com
Sun Dec 19 19:16:27 CET 2004


Rahul wrote:
> I want to compute dot product of two vectors stored as lists a and b.a
> and b are of the same length.

. >>> import numarray as na
. >>> a, b = na.arange(5), na.arange(5, 10)
. >>> na.dot(a, b)
. 80

Steve



More information about the Python-list mailing list