title: Numpy compare 2 array shape, if different, append 0 to match shape
body: <p>I am comparing 2 numpy arrays, and want to add them together. but, before doing so, i need to make sure they are the same size. If the size are not same, then take the smaller sized one and fill the last rows with zero to match the shape. 
  Both array have 16 columns and N rows. I am assuming it should be pretty straight forward, but I can't get my head around it. So far I am able to compare the 2 array shape.</p>
  
  <pre><code>import csv
  import numpy as np
  import sys
  data = np.genfromtxt('./test1.csv', dtype=float, delimiter=',')
  data_sys = np.genfromtxt('./test2.csv', dtype=float, delimiter=',')   
  print data.shape
  print data_sys.shape
  if data.shape != data_sys.shape:
          print "we have an error"
  </code></pre>
  
  <p>This is the output I got:</p>
  
  <pre><code>=============New file.csv============
  (603, 16)
  (604, 16)
  we have an error
  </code></pre>
  
  <p>I want the fill the last row of "data" array with 0 so that I can add the 2 arrays.
  Thanks for your help.</p>