title: scipy.optimize.minimize: success is True, but L-BFGS-B prints a worrying warning
body: <p>I use <code>scipy.optimize.minimize()</code> for univariate linear regression where I want the cost function to be different that quadratic (thus can't use <code>scipy.stats.linregress()</code>).
  Because I specify bounds (<code>a</code> and <code>b</code> need to be positive in my <code>y = a*x + b</code>), SciPy chooses <code>L-BFGS-B</code> as a solver. I trust SciPy on that, plus I don't change any of its default parameter values.</p>
  <p>The result of fitting is:</p>
  <pre><code> Warning:  more than 10 function and gradient                                                            
     evaluations in the last line search.  Termination                                                     
     may possibly be caused by a bad search direction.                                                                                                                                                                                                                     
   hess_inv: &lt;2x2 LbfgsInvHessProduct with dtype=float64&gt;                                                                                                                                                            
        jac: array([4.42014425e+00, 1.81898925e-04])                                                                                                                                                                 
    message: 'CONVERGENCE: REL_REDUCTION_OF_F_&lt;=_FACTR*EPSMCH'                                                                                                                                                       
       nfev: 105                                                                                                                                                                                                     
        nit: 7                                                                                                                                                                                                       
       njev: 35                                                                                                                                                                                                      
     status: 0                                                                                             
    success: True   
  </code></pre>
  <p>So, on one hand, success is <code>True</code> (great), but then the Warning message suggests that perhaps the algorithm terminated in a bad spot because of some other stop condition. The question is then: what shall I do with it? I can't even detect this situation automatically, as it is just a Warning printed on the screen. Although the <code>d</code> dict mentioned <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.fmin_l_bfgs_b.html" rel="nofollow noreferrer">here</a> could be helpful, it is not returned by the <a href="https://docs.scipy.org/doc/scipy/reference/generated/scipy.optimize.OptimizeResult.html#scipy.optimize.OptimizeResult" rel="nofollow noreferrer">wrapping function</a>.</p>
  <p>In short: Is it enough to check the 'success' flag? Should I fight it with parameters manipulation or is that fine?</p>