title: Python: Find index of first instance of zero in an array, if none are found return None
body: <p>Given an array like this</p>
  <pre><code>a1= np.array([0,2,0,3])
  </code></pre>
  <p>if i want to return index of the first zero I do simply:</p>
  <pre><code>(a1==0).argmax(axis=0)
  &gt;&gt; 0
  </code></pre>
  <p>however for the list like this:</p>
  <pre><code>a2= np.array([1,2,3,3])
  </code></pre>
  <p>It returns the same thing although the array does not have any zeros.</p>
  <pre><code>(a2==0).argmax(axis=0)
  &gt;&gt; 0
  </code></pre>
  <p>How can I distinguish between these situations? Is it possible to impose that if an array does not have any zeros, the algorithm should return None?</p>