title: `vectorize` for each row in Numpy
body: <p>Suppose I have an n x m Matrix and want to call a function <code>fct</code> on each of its elements. I can do it like:</p>
  
  <pre><code>A = numpy.array(...)
  vec_func = numpy.vectorize(fct)
  A_out = vec_func(A)
  </code></pre>
  
  <p>This will strictly apply the function on each of the matrix elements, fct would be a function:</p>
  
  <pre><code>def fct(a_ij):
    # do something with matrix element a(i, j)
  </code></pre>
  
  <p>Now I'd like the same, but for each row of the matrix:</p>
  
  <pre><code>def fct(row_i):
    # do something with matrix row(i)
  </code></pre>
  
  <p>Is there a way to do it with <code>numpy.vectorize</code> or similiar?</p>