[Numpy-discussion] dot function or dot notation, matrices, arrays?

Keith Goodman kwgoodman@gmail....
Fri Dec 18 16:54:49 CST 2009


On Fri, Dec 18, 2009 at 2:51 PM, Wayne Watson
<sierra_mtnview@sbcglobal.net> wrote:
> That should do it. Thanks. How do I get the scalar result by itself?

>> np.dot(x.T,x)[0,0]
   14

or

>> x = np.array([1,2,3])
>> np.dot(x,x)
   14


More information about the NumPy-Discussion mailing list