scikit-learn/scikit-learn — pull request #3725 by cocu (2014-09-30 19:15:04+00:00)
Title: Fix nearly zero division

fixes #3722
- separate "reset zero to 1.0" function from `_mean_and_std()`
- add `_replace_nearly_value()` function
- with` isclose()`, "nealy" zero values also replaced to 1.0
- add floating point error testcase