[SciPy-User] vdot vs. dot

Nico Schlömer nico.schloemer@gmail....
Thu Oct 14 02:40:55 CDT 2010


Hi,

I played around with .dot() and .vdot() a bit, and noticed that -- as
opposed to what I expected -- they behave quite differently. Consider
the output of

===================== *snip* =====================
import numpy as np

n = 10
k = 3

X = np.random.rand( k, 10 ) + 1j * np.random.rand( k, 10 )
Y = np.random.rand( 10, k ) + 1j * np.random.rand( 10, k )

print np.dot( X.conjugate(), Y )
print
print np.vdot( X, Y )
===================== *snap* =====================

vdot() returns a *scalar* here, and I've got no idea how it is computed.
Why isn't  vdot( x, y ) == dot( x.conjugate(), y )?

Cheers,
Nico


More information about the SciPy-User mailing list