title: RuntimeWarning: divide by zero encountered in log (stats.boxcox)
body: <p>I am getting the <code>RuntimeWarning: divide by zero encountered in log</code> error when I tried to run <code>stats.boxcox(list)</code>.</p>
  
  <p>The list contained no zero values. I have refers to some others posts saying that we can ignore the error using <code>np.errstate()</code>.</p>
  
  <p>But, in my case, I don't think it is proper as the value return by <code>stats.boxcox()</code> are meaningless (all constant, see below).</p>
  
  <pre><code>array([ 0.11472901,  0.11472901,  0.11472901,  0.11472901,  0.11472901,
      0.11472901,  0.11472901,  0.11472901,  0.11472901,  0.11472901,
      0.11472901,  0.11472901,  0.11472901,  0.11472901,  0.11472901,
      0.11472901,  0.11472901,  ... ... ]
  </code></pre>
  
  <p>The details of the error are as follow:</p>
  
  <pre><code>/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/stats/morestats.py:591: RuntimeWarning: divide by zero encountered in log
  llf -= N / 2.0 * np.log(np.sum((y - y_mean)**2. / N, axis=0))
  /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/scipy/optimize/optimize.py:2063: RuntimeWarning: invalid value encountered in double_scalars
  w = xb - ((xb - xc) * tmp2 - (xb - xa) * tmp1) / denomenter code here
  </code></pre>