title: Check for array - is value contained in another array?
body: <p>I'd like to return a boolean for each value in array <code>A</code> that indicates whether it's in array <code>B</code>. This should be a standard procedure I guess, but I can't find any information on how to do it. My attempt is below:</p>
  
  <pre><code>A = ['User0','User1','User2','User3','User4','User0','User1','User2','User3'
       'User4','User0','User1','User2','User3','User4','User0','User1','User2'
       'User3','User4','User0','User1','User2','User3','User4','User0','User1'
       'User2','User3','User4','User0','User1']
  B = ['User3', 'User2', 'User4']
  contained = (A in B)
  </code></pre>
  
  <p>However, I get the error:</p>
  
  <pre><code>ValueError: shape mismatch: objects cannot be broadcast to a single shape
  </code></pre>
  
  <p>I'm using numpy so any solution using numpy or standard Python would be preferred.</p>