title: numpy ndarrays: row-wise and column-wise operations
body: <p>If I wanted to apply a function row-wise (or column-wise) to an ndarray, do I look to ufuncs (doesn't seem like it) or some type of array broadcasting (not what I'm looking for either?) ?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>I am looking for something like R's apply function. For instance,</p>
  
  <pre><code>apply(X,1,function(x) x*2)
  </code></pre>
  
  <p>would multiply 2 to each row of X through an anonymously defined function, but could also be a named function. (This is of course a silly, contrived example in which <code>apply</code> is not actually needed). There is no generic way to apply a function across an NumPy array's "axis", ?</p>