title: Elementwise logical comparison of numpy arrays
body: <p>I have two numpy arrays of the same shape. The elements in the arrays are random integers from [0,N]. I need to check which (if any) of the elements in the same position in the arrays are equal.</p>
  
  <p>The output I need are the positions of the same elements.</p>
  
  <p>mock code:</p>
  
  <pre><code>A=np.array([0,1])
  B=np.array([1,0])
  C=np.array([1,1])
  np.any_elemenwise(A,B)
  np.any_elemenwise(A,C)
  np.any_elemenwise(A,A)
  </code></pre>
  
  <p>desired output:</p>
  
  <pre><code>[]
  [1]
  [0,1]
  </code></pre>
  
  <p>I can write a loop going through all of the elements one by one, but I assume that the desired output can be achieved much faster.</p>