Hi, good question. What you can do to fix this is to make it explicit to forcing on the dimension to the array.
Check out the following piece of code for clarity:
>>> a = np.array([5, 6, 7])
>>> a
array([5, 6, 7])
>>> a.transpose()
array([5, 6, 7])
>>> a.dot(a.transpose())
14
Now, you use the column vector for specificity and you make sure that it is forced upon and used.
Check out the below code:
>>> a.shape = (3,1)
>>> a
array([[5],
[6],
[7]])
>>> a.transpose()
array([[5, 6, 7]])
>>> a.dot(a.transpose())
array([[1, 2, 3],
[2, 4, 6],
[3, 6, 9]])
Hope this helped!