title: numpy swap multiple elements in an array
body: <p>I have a numpy array containing a random spread of 1s and 0s. I want to replace all the 1s with a 0 and all the zeros with a 1.</p>
  
  <pre><code>arr[arr == 0] = 2
  arr[arr == 1] = 0
  arr[arr == 2] = 1
  </code></pre>
  
  <p>I'm currently having to use a temporary value (2 in this case) in order to avoid all the 0s becoming 1s and then subsequently making the entire array full of 0s.
  Is there a more elegant/efficient way to do this?</p>