title: How to sum a single column array with another array (going column by column)?
body: <p>The code below allows me to add a vector to each row of a given matrix using Numpy:</p>
  <pre><code>import numpy as np
  m = np.array([[1,2,3], [4,5,6], [7,8,9], [10, 11, 12]])
  v = np.array([1, 1, 0])
  print(&quot;Original vector:&quot;)
  print(v)
  print(&quot;Original matrix:&quot;)
  print(m)
  result = np.empty_like(m) 
  for i in range(4):
    result[i, :] = m[i, :] + v
  print(&quot;\nAfter adding the vector v to each row of the matrix m:&quot;)
  print(result)
  </code></pre>
  <p>How do I perform a similar addition operation, but going column by column?
  I have tried the following:</p>
  <pre><code>import numpy as np
  array1 = np.array([[5,5,3],[2,2,3]])
  print(array1)
  addition = np.array([[1],[1]])
  print(addition)
  for i in range(3):
      array1[:,i] = array1[:,i] + addition
  print(array1)
  </code></pre>
  <p>However, I get the following broadcasting error:</p>
  <pre><code>ValueError: could not broadcast input array from shape (2,2) into shape (2)
  </code></pre>