title: Numpy where conditional statement along axis 0
body: <p>I have a 1D vector <code>Zc</code> containing n elements that are 2D arrays.  I want to find the index of each 2D array that equals <code>np.ones(Zc[i].shape)</code>.   </p>
  
  <pre><code>a = np.zeros((5,5))
  b = np.ones((5,5))*4
  c = np.ones((5,5))
  d = np.ones((5,5))*2
  
  Zc = np.stack((a,b,c,d))
  
  for i in range(len(Zc)):
      a = np.ones(Zc[i].shape)
      b = Zc[i]
      if np.array_equal(a,b):
          print(i)
      else:
          pass 
  </code></pre>
  
  <p>Which returns <code>2</code>.  The code above works and returns the correct answer, but I want to know if there a vectorized way to achieve the same result?</p>