title: Numpy array apply a function only to some elements
body: <p>I have a numpy array let's say that has a shape (10,10) for example.
  Now i want to apply np.exp() to this array, but just to some specific elements that satisfy a condition. For example i want to apply np.exp to all the elements that are not 0 or 1. Is there a way to do that without using for loop that iterate on each element of the array?</p>