title: Comparing elements of numpy arrays in python
body: <p>I want to compare two 1x3 arrays such as:</p>
  
  <pre><code>if output[x][y] != [150,25,75]
  </code></pre>
  
  <p>(<code>output</code> here is a 3x3x3 so <code>output[x][y]</code> is only a 1x3).</p>
  
  <p>I'm getting an error that says:</p>
  
  <pre><code>ValueError: The truth value of an array with more than one element is ambiguous. 
  </code></pre>
  
  <p>Does that mean I need to do it like:</p>
  
  <pre><code>if output[y][x][0] == 150 and output[y][x][1] == 25 and output[y][x][2] == 75:
  </code></pre>
  
  <p>or is there a cleaner way to do this?</p>
  
  <p>I'm using Python v2.6</p>