# [PYTHON MATRIX-SIG] Documentation

James Hugunin jjh@Goldilocks.LCS.MIT.EDU
Mon, 29 Jan 96 13:20:43 EST

```Short answer: Not yet.

If you are confused about how to do something with the array object,
this is the perfect place to ask questions. I'll try and collect the
answers to these questions into the Tutorial (and then when the BETA
release comes out those folks will have a real tutorial).

There are two ways to take the dot product of two vectors a and b.

The first is close to the standard form for writing a dot product:

will run several orders of magnitude faster for large arrays.

The module Numeric.py also defines the function sum, which is
equivalent to add.reduce, so this could also be written as:

> sum(a*b)

The second approach is to realize that matrixMultiply when applied to
two vectors is equivalent to taking their dot product, so the
following will also work (and will run the fastest):

a.matrixMultiply(b)

-Jim

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org