tBuLi / symfit

Symbolic Fitting; fitting as it should be.
http://symfit.readthedocs.org
MIT License
235 stars 18 forks source link

RuntimeWarning when calculating R^2 #258

Open tBuLi opened 5 years ago

tBuLi commented 5 years ago

Users are still reporting this:

/Users/pbos/sw/miniconda3/lib/python3.6/site-packages/symfit/core/fit_results.py:277: RuntimeWarning: divide by zero encountered in double_scalars
  return 1 - SS_res/SS_tot

We should probably repress this and not return R^2 at all when this happens.