I am having trouble finding a solution to this. Using numpy arrays, I wanna multiply a 3x1 array with 1x3 array, and as a result end up with 3x3 array. Since dot function assumes the first element as column vector and the second as row vector, I cannot get it working. This is what I am using
A=array([1,2,3])
print "Amat=",dot(A,A)
print "A2mat=",dot(A.transpose(),A)
print "A3mat=",dot(A,A.transpose())
u2=mat([ux,uy,uz])
print "u2mat=", u2.transpose()*u2
And the output
Amat= 14
A2mat= 14
A3mat= 14
u2mat=
[[ 0. 0. 0.]
[ 0. 0. 0.]
[ 0. 0. 1.]]