title: Replace multiple values in Numpy Array
body: <p>Given the following example array:</p>
  
  <pre class="lang-py prettyprint-override"><code>import numpy as np
  
  example = np.array(
    [[[   0,    0,    0,  255],
      [   0,    0,    0,  255]],
  
     [[   0,    0,    0,  255],
      [ 221,  222,   13,  255]],
  
     [[-166, -205, -204,  255],
      [-257, -257, -257,  255]]]
  )
  </code></pre>
  
  <p>I want to replace values <code>[0, 0, 0, 255]</code> values with <code>[255, 0, 0, 255]</code> and everything else becomes <code>[0, 0, 0, 0]</code>.</p>
  
  <p>So the desired output is:</p>
  
  <pre class="lang-py prettyprint-override"><code>[[[   255,    0,    0,  255],
    [   255,    0,    0,  255]],
  
   [[   255,    0,    0,  255],
    [     0,    0,    0,    0]],
  
   [[     0,    0,    0,    0],
    [     0,    0,    0,    0]]
  </code></pre>
  
  <p>This solution got close:</p>
  
  <pre class="lang-py prettyprint-override"><code>np.place(example, example==[0, 0, 0,  255], [255, 0, 0, 255])
  np.place(example, example!=[255, 0, 0, 255], [0, 0, 0, 0])
  </code></pre>
  
  <p>But it outputs this instead:</p>
  
  <pre class="lang-py prettyprint-override"><code>[[[255   0   0 255],
    [255   0   0 255]],
  
   [[255   0   0 255],
    [  0   0   0 255]], # &lt;- extra 255 here
  
   [[  0   0   0   0],
    [  0   0   0   0]]]
  </code></pre>
  
  <p>What's a good way to do this?</p>