How to get rid of specific warning messages in python while keeping all other warnings as normal?
<p>I am doing some simple math recessively in a python script and am getting the follow warning:
"Warning: divide by zero encountered in divide".  To provide some context, I am taking two values and trying to find the percent difference in value (a-b)/a and if its above a certain range then process it,but sometimes the value of a or b is zero.  </p>

<p>I want to get rid of this specific warning(at a specific line) but all the information I have found so far seems to show me how to stop all warnings(which I do not want). </p>

<p>When I used to write shell scripts, I could do something like this
code...
more code 2> error.txt
even more code  </p>

<p>In that example, I would get the warnings for the 'code' and 'even more code' command but not for the second line.  </p>

<p>Is this possible?</p>
