title: RuntimeWarning: divide by zero encountered in divide
body: <p>I'm asking a question about this error : RuntimeWarning: divide by zero encountered in divide</p>
  
  <p>For example, I have two 2D arrays. The first one contains lot of data (array_1), and the second one owns binary data (0 or 1) as a mask (mask_array).</p>
  
  <p>I would like make this operation :</p>
  
  <pre><code>result = array_1 / mask_array
  </code></pre>
  
  <p>Obviously, I will get this RuntimeWarning error. So my question is :
  Is it possible to write something like this : If I divide by zero, write 0 as result ?</p>
  
  <p>I suppose that I will get a NaN if I divide by 0 ?</p>
  
  <p>So how I can make the operation and replace the result by zero each time I will get the error ?</p>
  
  <p>Thank you to your help !</p>