scikit-learn/scikit-learn — pull request #1554 by arjoly (2013-01-10 09:44:44+00:00)
Title: [WIP] new doctest example are not crossplatform

I try to solve ```Build failed in Jenkins: python-2.7-numpy-1.6.2-scipy-0.10.1 #1692``.

Three errors are given
```

======================================================================
FAIL: Doctest: model_evaluation.rst
----------------------------------------------------------------------
Traceback (most recent call last):
File "/sp/lib/python/cpython-2.7.2/lib/python2.7/doctest.py", line 2166, in runTest
raise self.failureException(self.format_failure(new.getvalue()))
AssertionError: Failed doctest test for model_evaluation.rst
File " line 0

----------------------------------------------------------------------
File " line 314, in model_evaluation.rst
Failed example:
metrics.precision_recall_fscore_support(y_true, y_pred, beta=0.5)
Expected:
(array([ 0.66666667, 1. ]), array([ 1. , 0.5]), array([ 0.71428571, 0.83333333]), array([2, 2], dtype=int64))
Got:
(array([ 0.66666667, 1. ]), array([ 1. , 0.5]), array([ 0.71428571, 0.83333333]), array([2, 2]))
----------------------------------------------------------------------
File " line 472, in model_evaluation.rst
Failed example:
metrics.precision_recall_fscore_support(y_true, y_pred, beta=0.5)
Expected:
(array([ 0.66666667, 0. , 0. ]), array([ 1., 0., 0.]), array([ 0.71428571, 0. , 0. ]), array([2, 2, 2], dtype=int64))
Got:
(array([ 0.66666667, 0. , 0. ]), array([ 1., 0., 0.]), array([ 0.71428571, 0. , 0. ]), array([2, 2, 2]))
----------------------------------------------------------------------
File " line 506, in model_evaluation.rst
Failed example:
hinge_loss([-1, 1, 1], pred_decision)
Expected:
0.30303676038544258
Got:
0.30303676038544253

>> raise self.failureException(self.format_failure(.getvalue()))
```

I solved floating precision with `# doctest: +ELLIPSIS`.
However, I haven't succeed to solve the `dtype=int64` properly. Any advice is appreciated.