title: Mapping values in a numpy array
body: <p>How do I go from a 2D numpy array where I only have three distinct values: -1, 0, and 1 and map them to the colors <code>red</code> (255,0,0), <code>green</code> (0,255,0), and <code>blue</code> (255,0,0)? The array is quite large, but to give you an idea of what I am looking for, imagine I have the input</p>
  
  <pre><code>array([[ 1,  0, -1],
         [-1,  1,  1],
         [ 0,  0,  1]])
  </code></pre>
  
  <p>I want the output:</p>
  
  <pre><code>array([[(0, 0, 255), (0, 255, 0), (255, 0, 0)],
         [(255, 0, 0), (0, 0, 255), (0, 0, 255)],
         [(0, 255, 0), (0, 255, 0), (0, 0, 255)]])
  </code></pre>
  
  <p>I could for-loop and have conditions but I was wondering if there is a one or two liner using a lambda function that could accomplish this? Thanks!</p>