title: Checking if a NumPy array contains another array
body: <p>Using NumPy with Python 2.7, I want to create an n-by-2 array <code>y</code>. Then, I want to check whether this array contains a particular 1-by-2 array <code>z</code> in any of its rows.</p>
  
  <p>Here's what I have tried so far, and in this case, n = 1:</p>
  
  <pre><code>x = np.array([1, 2]) # Create a 1-by-2 array
  y = [x] # Create an n-by-2 array (n = 1), and assign the first row to x
  z = np.array([1, 2]) # Create another 1-by-2 array
  if z in y: # Check if y contains the row z
      print 'yes it is'
  </code></pre>
  
  <p>However, this gives me the following error:</p>
  
  <pre><code>ValueError: The truth value of an array with more than one element is ambiguous. Use a.any() or a.all()
  </code></pre>
  
  <p>What am I doing wrong?</p>