title: Find the numpy array elements satisfying the condition
body: <p>I have a numpy array and I want to find the elements satisfying my condition
  The codes are as below:</p>
  
  <pre><code>import numpy as np
  a = np.array([[1, 2], [1, 3], [1, 2]])
  b = np.array([1, 2])
  c = (a == b) 
  </code></pre>
  
  <p>The results are</p>
  
  <pre><code>[[ True  True]
  [ True False]
  [ True  True]]
  </code></pre>
  
  <p>But what I want is [True, False, True] or the indices [0, 2]. </p>
  
  <p>Although I can achieve this by list comprehension, like</p>
  
  <pre><code>c = [all(b==x) for x in a]
  </code></pre>
  
  <p>But I want to find this element in a 3d matrix in the future, like</p>
  
  <pre><code>a = np.array([[[1, 2], [1, 3], [1, 2]], 
           [[7, 2], [1, 2], [4, 2]]])
  </code></pre>
  
  <p>I want the index like [[0, 0], [0, 2], [1, 1]]</p>
  
  <p>How should I achieve this by numpy?</p>