<p dir="auto">Since I am tired of getting tons of emails because of Jenkins failing, I tried to look it up.</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="======================================================================
ERROR: sklearn.metrics.tests.test_metrics.test_classification_report_multiclass_with_unicode_label
----------------------------------------------------------------------
Traceback (most recent call last):
  File &quot;/home/slave/virtualenvs/cpython-2.6/lib/python2.6/site-packages/nose/case.py&quot;, line 197, in runTest
    self.test(*self.arg)
  File &quot;&lt;https://jenkins.shiningpanda-ci.com/scikit-learn/job/python-2.6-numpy-1.3.0-scipy-0.7.2/ws/sklearn/metrics/tests/test_metrics.py&quot;,&gt; line 855, in test_classification_report_multiclass_with_unicode_label
    report = classification_report(y_true, y_pred)
  File &quot;&lt;https://jenkins.shiningpanda-ci.com/scikit-learn/job/python-2.6-numpy-1.3.0-scipy-0.7.2/ws/sklearn/metrics/metrics.py&quot;,&gt; line 1768, in classification_report
    average=None)
  File &quot;&lt;https://jenkins.shiningpanda-ci.com/scikit-learn/job/python-2.6-numpy-1.3.0-scipy-0.7.2/ws/sklearn/metrics/metrics.py&quot;,&gt; line 1515, in precision_recall_fscore_support
    precision = precision[indices]
IndexError: index 3 out of bounds 0&lt;=index&lt;3"><pre class="notranslate"><code class="notranslate">======================================================================
ERROR: sklearn.metrics.tests.test_metrics.test_classification_report_multiclass_with_unicode_label
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/slave/virtualenvs/cpython-2.6/lib/python2.6/site-packages/nose/case.py", line 197, in runTest
    self.test(*self.arg)
  File "&lt;https://jenkins.shiningpanda-ci.com/scikit-learn/job/python-2.6-numpy-1.3.0-scipy-0.7.2/ws/sklearn/metrics/tests/test_metrics.py",&gt; line 855, in test_classification_report_multiclass_with_unicode_label
    report = classification_report(y_true, y_pred)
  File "&lt;https://jenkins.shiningpanda-ci.com/scikit-learn/job/python-2.6-numpy-1.3.0-scipy-0.7.2/ws/sklearn/metrics/metrics.py",&gt; line 1768, in classification_report
    average=None)
  File "&lt;https://jenkins.shiningpanda-ci.com/scikit-learn/job/python-2.6-numpy-1.3.0-scipy-0.7.2/ws/sklearn/metrics/metrics.py",&gt; line 1515, in precision_recall_fscore_support
    precision = precision[indices]
IndexError: index 3 out of bounds 0&lt;=index&lt;3
</code></pre></div>
<p dir="auto">If I am not wrong, this bug originates from <code class="notranslate">indices = np.searchsorted(labels, label_order)</code> in <code class="notranslate">metrics.py</code> when labels contains unicode strings. It seems related to the following known (and fixed) issue in Numpy: <a href="http://mail.scipy.org/pipermail/numpy-discussion/2012-March/061495.html" rel="nofollow">http://mail.scipy.org/pipermail/numpy-discussion/2012-March/061495.html</a></p>
<p dir="auto">What shall we do about this?</p>
<p dir="auto">A <a href="https://travis-ci.org/scikit-learn/scikit-learn/builds/340071949?utm_source=email&amp;utm_medium=notification" rel="nofollow">Test failure on Travis</a> presumably due to changes in lbfgs:</p>
<div class="highlight highlight-text-python-traceback notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="=================================== FAILURES ===================================
________________________________ test_max_iter _________________________________
    @ignore_warnings
    def test_max_iter():
        # Test that the maximum number of iteration is reached
        X, y_bin = iris.data, iris.target.copy()
        y_bin[y_bin == 2] = 0
    
        solvers = ['newton-cg', 'liblinear', 'sag', 'saga', 'lbfgs']
    
        for max_iter in range(1, 5):
            for solver in solvers:
                for multi_class in ['ovr', 'multinomial']:
                    if solver == 'liblinear' and multi_class == 'multinomial':
                        continue
                    lr = LogisticRegression(max_iter=max_iter, tol=1e-15,
                                            multi_class=multi_class,
                                            random_state=0, solver=solver)
                    lr.fit(X, y_bin)
&gt;                   assert_equal(lr.n_iter_[0], max_iter)
X          = array([[ 5.1,  3.5,  1.4,  0.2],
       [ 4.9,  3. ,  1.4,  0.2],
       [ 4.7,  3.2,  1.3,  0.2],
       [ 4.6,  3.1,...  2.5,  5. ,  1.9],
       [ 6.5,  3. ,  5.2,  2. ],
       [ 6.2,  3.4,  5.4,  2.3],
       [ 5.9,  3. ,  5.1,  1.8]])
lr         = LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,
          intercept_scaling=1, max_iter=1...r', n_jobs=1,
          penalty='l2', random_state=0, solver='lbfgs', tol=1e-15,
          verbose=0, warm_start=False)
max_iter   = 1
multi_class = 'ovr'
solver     = 'lbfgs'
solvers    = ['newton-cg', 'liblinear', 'sag', 'saga', 'lbfgs']
y_bin      = array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
/home/travis/build/scikit-learn/scikit-learn/sklearn/linear_model/tests/test_logistic.py:1053: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/python/3.6.3/lib/python3.6/unittest/case.py:829: in assertEqual
    assertion_func(first, second, msg=msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = &lt;sklearn.utils._unittest_backport.TestCase testMethod=__init__&gt;
first = 0, second = 1, msg = '0 != 1'
    def _baseAssertEqual(self, first, second, msg=None):
        &quot;&quot;&quot;The default assertEqual implementation, not type specific.&quot;&quot;&quot;
        if not first == second:
            standardMsg = '%s != %s' % _common_shorten_repr(first, second)
            msg = self._formatMessage(msg, standardMsg)
&gt;           raise self.failureException(msg)
E           AssertionError: 0 != 1
first      = 0
msg        = '0 != 1'
second     = 1
self       = &lt;sklearn.utils._unittest_backport.TestCase testMethod=__init__&gt;
standardMsg = '0 != 1'
/opt/python/3.6.3/lib/python3.6/unittest/case.py:822: AssertionError"><pre class="notranslate">=================================== FAILURES ===================================
________________________________ test_max_iter _________________________________
    <span class="pl-k">@</span>ignore_warnings
    <span class="pl-k">def</span> <span class="pl-en">test_max_iter</span>():
        <span class="pl-c"><span class="pl-c">#</span> Test that the maximum number of iteration is reached</span>
        X, y_bin <span class="pl-k">=</span> iris.data, iris.target.copy()
        y_bin[y_bin <span class="pl-k">==</span> <span class="pl-c1">2</span>] <span class="pl-k">=</span> <span class="pl-c1">0</span>
    
        solvers <span class="pl-k">=</span> [<span class="pl-s"><span class="pl-pds">'</span>newton-cg<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>liblinear<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>sag<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>saga<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>lbfgs<span class="pl-pds">'</span></span>]
    
        <span class="pl-k">for</span> max_iter <span class="pl-k">in</span> <span class="pl-c1">range</span>(<span class="pl-c1">1</span>, <span class="pl-c1">5</span>):
            <span class="pl-k">for</span> solver <span class="pl-k">in</span> solvers:
                <span class="pl-k">for</span> multi_class <span class="pl-k">in</span> [<span class="pl-s"><span class="pl-pds">'</span>ovr<span class="pl-pds">'</span></span>, <span class="pl-s"><span class="pl-pds">'</span>multinomial<span class="pl-pds">'</span></span>]:
                    <span class="pl-k">if</span> solver <span class="pl-k">==</span> <span class="pl-s"><span class="pl-pds">'</span>liblinear<span class="pl-pds">'</span></span> <span class="pl-k">and</span> multi_class <span class="pl-k">==</span> <span class="pl-s"><span class="pl-pds">'</span>multinomial<span class="pl-pds">'</span></span>:
                        <span class="pl-k">continue</span>
                    lr <span class="pl-k">=</span> LogisticRegression(<span class="pl-v">max_iter</span><span class="pl-k">=</span>max_iter, <span class="pl-v">tol</span><span class="pl-k">=</span><span class="pl-c1">1e-15</span>,
                                            multi_class<span class="pl-k">=</span>multi_class,
                                            random_state<span class="pl-k">=</span><span class="pl-c1">0</span>, solver<span class="pl-k">=</span>solver)
                    lr.fit(X, y_bin)
&gt;                   assert_equal(lr.n_iter_[0], max_iter)
X          = array([[ 5.1,  3.5,  1.4,  0.2],
       [ <span class="pl-c1">4.9</span>,  <span class="pl-c1">3</span>. ,  <span class="pl-c1">1.4</span>,  <span class="pl-c1">0.2</span>],
       [ <span class="pl-c1">4.7</span>,  <span class="pl-c1">3.2</span>,  <span class="pl-c1">1.3</span>,  <span class="pl-c1">0.2</span>],
       [ <span class="pl-c1">4.6</span>,  <span class="pl-c1">3.1</span>,<span class="pl-c1">...</span>  <span class="pl-c1">2.5</span>,  <span class="pl-c1">5</span>. ,  <span class="pl-c1">1.9</span>],
       [ <span class="pl-c1">6.5</span>,  <span class="pl-c1">3</span>. ,  <span class="pl-c1">5.2</span>,  <span class="pl-c1">2</span>. ],
       [ <span class="pl-c1">6.2</span>,  <span class="pl-c1">3.4</span>,  <span class="pl-c1">5.4</span>,  <span class="pl-c1">2.3</span>],
       [ <span class="pl-c1">5.9</span>,  <span class="pl-c1">3</span>. ,  <span class="pl-c1">5.1</span>,  <span class="pl-c1">1.8</span>]])
lr         = LogisticRegression(C=1.0, class_weight=None, dual=False, fit_intercept=True,
          intercept_scaling<span class="pl-k">=</span><span class="pl-c1">1</span>, max_iter<span class="pl-k">=</span><span class="pl-c1">1</span><span class="pl-c1">...</span><span class="pl-sr"><span class="pl-k">r</span><span class="pl-pds">'</span>, n_jobs=1,</span>
          penalty<span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">'</span>l2<span class="pl-pds">'</span></span>, random_state<span class="pl-k">=</span><span class="pl-c1">0</span>, solver<span class="pl-k">=</span><span class="pl-s"><span class="pl-pds">'</span>lbfgs<span class="pl-pds">'</span></span>, tol<span class="pl-k">=</span><span class="pl-c1">1e-15</span>,
          verbose<span class="pl-k">=</span><span class="pl-c1">0</span>, warm_start<span class="pl-k">=</span><span class="pl-c1">False</span>)
max_iter   = 1
multi_class = 'ovr'
solver     = 'lbfgs'
solvers    = ['newton-cg', 'liblinear', 'sag', 'saga', 'lbfgs']
y_bin      = array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
       <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>,<span class="pl-c1">...</span>       <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>,
       <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>, <span class="pl-c1">0</span>])
/home/travis/build/scikit-learn/scikit-learn/sklearn/linear_model/tests/test_logistic.py:1053: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/opt/python/3.6.3/lib/python3.6/unittest/case.py:829: in assertEqual
    assertion_func(first, second, <span class="pl-v">msg</span><span class="pl-k">=</span>msg)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
self = &lt;sklearn.utils._unittest_backport.TestCase testMethod=__init__&gt;
first = 0, second = 1, msg = '0 != 1'
    <span class="pl-k">def</span> <span class="pl-en">_baseAssertEqual</span>(<span class="pl-smi"><span class="pl-smi">self</span></span>, <span class="pl-smi">first</span>, <span class="pl-smi">second</span>, <span class="pl-smi">msg</span><span class="pl-k">=</span><span class="pl-c1">None</span>):
        <span class="pl-s"><span class="pl-pds">"""</span>The default assertEqual implementation, not type specific.<span class="pl-pds">"""</span></span>
        <span class="pl-k">if</span> <span class="pl-k">not</span> first <span class="pl-k">==</span> second:
            standardMsg <span class="pl-k">=</span> <span class="pl-s"><span class="pl-pds">'</span><span class="pl-c1">%s</span> != <span class="pl-c1">%s</span><span class="pl-pds">'</span></span> <span class="pl-k">%</span> _common_shorten_repr(first, second)
            msg <span class="pl-k">=</span> <span class="pl-c1">self</span>._formatMessage(msg, standardMsg)
&gt;           raise self.failureException(msg)
E           AssertionError: 0 != 1
first      = 0
msg        = '0 != 1'
second     = 1
self       = &lt;sklearn.utils._unittest_backport.TestCase testMethod=__init__&gt;
standardMsg = '0 != 1'
/opt/python/3.6.3/lib/python3.6/unittest/case.py:822: AssertionError</pre></div>