title: NumPy: Comparing Elements in Two Arrays
body: <p>Anyone ever come up to this problem? Let's say you have two arrays like the following</p>
  
  <pre><code>a = array([1,2,3,4,5,6])
  b = array([1,4,5])
  </code></pre>
  
  <p>Is there a way to compare what elements in a exist in b? For example,</p>
  
  <pre><code>c = a == b # Wishful example here
  print c
  array([1,4,5])
  # Or even better
  array([True, False, False, True, True, False])
  </code></pre>
  
  <p>I'm trying to avoid loops as it would take ages with millions of elements. Any ideas?  </p>
  
  <p>Cheers</p>