title: testing whether a Numpy array contains a given row
body: <p>Is there a Pythonic and efficient way to check whether a Numpy array contains at least one instance of a given row?  By "efficient" I mean it terminates upon finding the first matching row rather than iterating over the entire array even if a result has already been found.</p>
  
  <p>With Python arrays this can be accomplished very cleanly with <code>if row in array:</code>, but this does not work as I would expect for Numpy arrays, as illustrated below.</p>
  
  <p>With Python arrays:</p>
  
  <pre><code>&gt;&gt;&gt; a = [[1,2],[10,20],[100,200]]
  &gt;&gt;&gt; [1,2] in a
  True
  &gt;&gt;&gt; [1,20] in a
  False
  </code></pre>
  
  <p>but Numpy arrays give different and rather odd-looking results. (The <code>__contains__</code> method of <code>ndarray</code> seems to be undocumented.)</p>
  
  <pre><code>&gt;&gt;&gt; a = np.array([[1,2],[10,20],[100,200]])
  &gt;&gt;&gt; np.array([1,2]) in a
  True
  &gt;&gt;&gt; np.array([1,20]) in a
  True
  &gt;&gt;&gt; np.array([1,42]) in a
  True
  &gt;&gt;&gt; np.array([42,1]) in a
  False
  </code></pre>