[SciPy-user] Dot in greater than 2D
Mon Jun 15 15:43:32 CDT 2009
On Mon, Jun 15, 2009 at 11:14 AM, <email@example.com> wrote:
> On Mon, Jun 15, 2009 at 1:52 PM, Brian Lewis<firstname.lastname@example.org>
> > 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
> > 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...
More information about the SciPy-user