title: How to calculate the sum of all columns of a 2D numpy array (efficiently)
body: <p>Let's say I have the following 2D numpy array consisting of four rows and three columns:</p>
  
  <pre><code>&gt;&gt;&gt; a = numpy.arange(12).reshape(4,3)
  &gt;&gt;&gt; print(a)
  [[ 0  1  2]
   [ 3  4  5]
   [ 6  7  8]
   [ 9 10 11]]
  </code></pre>
  
  <p>What would be an efficient way to generate a 1D array that contains the sum of all columns (like <code>[18, 22, 26]</code>)? Can this be done without having the need to loop through all columns?</p>