title: Python - List comphrehension with test to avoid division by zero
body: <p><code>a</code> and <code>b</code> are 1 dimensional numpy arrays (or python lists):</p>
  
  <p>I am doing this:</p>
  
  <pre><code>&gt;&gt;&gt; c = [x/y for x,y in zip(a,b)]
  </code></pre>
  
  <p>Occasionally <code>b</code> has a zero in it - so a division by zero error occurs.</p>
  
  <p>How can I conditionally check for a 0 value in <code>b</code> and set the corresponding element of <code>c</code> to 0?</p>