title: How to match pairs of values contained in two numpy arrays
body: <p>I have two sets of coordinates and want to find out which coordinates of the <code>coo</code> set are identical to any coordinate in the <code>targets</code> set. I want to know the indices in the <code>coo</code> set which means I'd like to get a list of indices or of bools.</p>
  
  <pre><code>import numpy as np
  
  coo = np.array([[1,2],[1,6],[5,3],[3,6]]) # coordinates
  targets = np.array([[5,3],[1,6]]) # coordinates of targets
  
  print(np.isin(coo,targets))
  
  [[ True False]
   [ True  True]
   [ True  True]
   [ True  True]]
  </code></pre>
  
  <p>The desired result would be one of the following two:</p>
  
  <pre><code>[False True True False] # bool list
  [1,2] # list of concerning indices
  </code></pre>
  
  <p>My problem is, that ...</p>
  
  <ul>
  <li><code>np.isin</code> has no <code>axis</code>-attribute so that I could use <code>axis=1</code>.</li>
  <li>even applying <em>logical and</em> to each row of the output would return <code>True</code> for the last element, which is wrong.</li>
  </ul>
  
  <p>I am aware of loops and conditions but I am sure Python is equipped with ways for a more elegant solution.</p>