[SciPy-user] Dot in greater than 2D

Brian Lewis brian.lewis17 at gmail.com
Mon Jun 15 16:43:32 EDT 2009


On Mon, Jun 15, 2009 at 11:14 AM, <josef.pktd at gmail.com> wrote:

> On Mon, Jun 15, 2009 at 1:52 PM, Brian Lewis<brian.lewis17 at gmail.com>
> wrote:
> > How is dot defined for matrices with dimension greater than 2?  The
> > docstring says:
> >
> >     dot(a,b)
> >     Returns the dot product of a and b for arrays of floating point
> types.
> >     Like the generic numpy equivalent the product sum is over
> >     the last dimension of a and the second-to-last dimension of b.
> >     NB: The first argument is not conjugated.
>
> What dot does this refer to? a namespace would be useful information
>
> >>> np.dot(np.ones((5,3,2)),np.ones((10,2,20))).shape
> (5, 3, 10, 20)
>
>
:( I used reshape() thinking it was inplace.  Ok...everything makes sense.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.scipy.org/pipermail/scipy-user/attachments/20090615/4965bd91/attachment.html>


More information about the SciPy-User mailing list