Skip to content

Commit

Permalink
DOC: optimize.differential_evolution fix newline (#12117)
Browse files Browse the repository at this point in the history
  • Loading branch information
flxai committed May 15, 2020
1 parent be3078b commit ec16ddc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion scipy/optimize/_differentialevolution.py
Expand Up @@ -195,7 +195,7 @@ def differential_evolution(func, bounds, args=(), strategy='best1bin',
creating trial candidates, which suit some problems more than others. The
'best1bin' strategy is a good starting point for many systems. In this
strategy two members of the population are randomly chosen. Their difference
is used to mutate the best member (the `best` in `best1bin`), :math:`b_0`,
is used to mutate the best member (the 'best' in 'best1bin'), :math:`b_0`,
so far:
.. math::
Expand Down Expand Up @@ -246,6 +246,7 @@ def differential_evolution(func, bounds, args=(), strategy='best1bin',
(array([1., 1., 1., 1., 1.]), 1.9216496320061384e-19)
Let's try and do a constrained minimization
>>> from scipy.optimize import NonlinearConstraint, Bounds
>>> def constr_f(x):
... return np.array(x[0] + x[1])
Expand Down

0 comments on commit ec16ddc

Please sign in to comment.