title: Dot product of a vector in SciPy/NumPy (getting ValueError: objects are not aligned)
body: <p>I just started learning SciPy and am struggling with the most basic features.</p>
  
  <p>Consider the following standard vector:</p>
  
  <pre><code>In [6]: W=array([[1],[2]])
  
  In [7]: print W
  [[1]
   [2]]
  </code></pre>
  
  <p>If I understand it correctly, this should be the SciPy representation of a standard 2x1 mathematical vector, like this:</p>
  
  <pre><code>(1)    
  (2)
  </code></pre>
  
  <p>The dot product of this vector should simply be <code>1*1+2*2=5</code>. However, this does not work in SciPy:</p>
  
  <pre><code>In [16]: dot(W, W)
  ---------------------------------------------------------------------------
  ValueError                                Traceback (most recent call last)
  /home/ingo/&lt;ipython-input-16-961b62a82495&gt; in &lt;module&gt;()
  ----&gt; 1 dot(W, W)
  
  ValueError: objects are not aligned
  </code></pre>
  
  <p>Note that the following works. This should be a vector of the form <code>(1 2)</code> if I am not mistaken.</p>
  
  <pre><code>In [9]: V=array([1,2])
  
  In [10]: print V
  [1 2]
  
  In [11]: dot(V, V)
  Out[11]: 5
  </code></pre>
  
  <p>What is my misconception? What am I doing wrong?</p>