Issue
i wrote two 1D complex vectors:
import numpy as np
a = np.array([2+3j])
b = np.array([4+5j])
print(np.vdot(a, b))
#-----------------------------------------------------------------
it retuned:
(23-2j)
instead of:
(-7+22j)
if a=2-3j i expect this result: (23-2j)
Solution
NumPy's vdot
takes the complex conjugate of the first argument. If you just use dot
you'll get the answer you expect.
Answered By - Matt Pitkin
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.