title: Vectorization of numpy dot product throws Value Error
body: <p>I have a function to calculate the dot product between two vectors and it works perfectly fine with single values</p>
  <p>However when I try to vectorize this function using a pandas dataframe it throws a Value error</p>
  <pre><code>def find_dot_prod(pt1, pt2, pt3, pt4, pt5, pt6):
      a = np.array([pt1, pt2])
      b = np.array([pt3, pt4])
      c = np.array([pt5, pt6])
      
      ba = a - b
      bc = c - b
  
      return np.dot(ba,bc)
  </code></pre>
  <p><strong>This works:</strong></p>
  <pre><code>find_dot_product(2, 6, 7, 9, 11,12)
  # -29
  </code></pre>
  <p><strong>This doesn't Works:</strong></p>
  <pre><code>df= pd.DataFrame({'pt1':[4,5,6,7,9,8,1,12,18,7],'pt2':[9,4,3,5,11,14,15,5,9,7]})
  df['dot_prod'] = find_dot_product(df['pt1'], df['pt2'],
                         df['pt1'].shift(), df['pt2'].shift(),
                         df['pt1'].shift(2), df['pt2'].shift(2))
  </code></pre>
  <p><strong>Error:</strong></p>
  <pre><code>ValueError: shapes (2,10) and (2,10) not aligned: 10 (dim 1) != 2 (dim 0)
  </code></pre>