title: How to apply multiple functions to numpy array?
body: <p>I know how to vectorize() or apply function along axis .. but my case is a bit different.
  I have 1D array (z) that contains 1 or 0 and then I have a 2D array (x).
  I want to apply two different functions for every row in array-x depending on the value for this row in array-z.</p>
  
  <pre><code>if 0 apply fun0()
  if 1 apply fun1()
  </code></pre>
  
  <p>I can also build an index and then apply by index, like this :</p>
  
  <pre><code>ndx1 = (z == 1)
  ndx0 = (z == 0)
  </code></pre>
  
  <p>and do f.e.:</p>
  
  <pre><code>fun(x[:,ndx])
  </code></pre>
  
  <p>but this wont change the array-x.
  I would need this modified array-x for further calculations. </p>
  
  <p>How would I do that ? (Somehow do inplace modification ?)
  I would love if there is also a function that takes an array of functions and applies it to another array :) this way I probably wont need to do inplace modifications ?</p>
  
  <p>thank you..</p>