title: Warning of divide by zero encountered in log2 even after filtering out negative values
body: <p>We get the error - "divide by zero encountered in log2"
  if the value is less than zero.  I am facing the error even when I exempt the non-positive values using where statement.</p>
  
  <pre><code>a = pd.Series([1,0,5,6,8])
  np.where(a&lt;=0, 1, np.log2(a))
  </code></pre>