Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: fix newline #12117

Merged
merged 2 commits into from May 15, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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