title: (Python) How to use conditional statements on every element of array using [:] syntax?
body: <p>If i need to ask a condition on every element of a numpy.ndarray of integers, do I have to use a for loop</p>
  
  <pre><code>for i in range(n):
      if a[i] == 0:
          a[i] = 1   
  </code></pre>
  
  <p>or can I ask the question using [:] syntax</p>
  
  <pre><code>if a[:] == 0:
      #...
  </code></pre>
  
  <p>I know the previous is wrong, but is there any way of doing something similar?</p>