title: Vectorizing numpy multidimensional array. Operation array wise not element wise
body: <p>I wasn't able to find some answer here, so I hope you guys can help.
  We all know, that we shouldn't iterate over an Array in python because it take so much time, so I want to vectorize it.
  First the Operation:
  My operation shall compare two 1D distributions:</p>
  
  <pre><code>from pyemd import emd
  def vectoriztaion(a=np.ones(25),b=np.ones(25)):
      value = pyemd.emd(np.array(a), np.array(b), helper.get_distance_matrix())
      return value
  </code></pre>
  
  <p>As you can see the input a and b are np.arrays of shape(25).
  Now I planned to use the np.vectorize function</p>
  
  <pre><code>vfunc = np.vectorize(vectoriztaion)
  result = vfunc(A,B)
  </code></pre>
  
  <p>where A and B are Both an np.array of shape(N,25).
  I want the code to return an np.array of shape(N).</p>
  
  <p>Running the Code giive me this Error:</p>
  
  <pre>
  ValueError: Buffer has wrong number of dimensions (expected 1, got 0)
  </pre>
  
  <p>If you have seen a similar question or if you know how I can get the Code running. 
  Pls, let me know.</p>
  
  <p>Thanks in advance</p>