Skip to content

Commit ed831c3

Browse files
authored
Merge pull request #73 from mrava87/main
Fixed error in nonlinearconstrained tutorial
2 parents f880271 + 854b5e1 commit ed831c3

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

tutorials/nonlinearconstrained.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,11 @@ def callback(x):
171171

172172
self.solhist = []
173173
self.solhist.append(self.x0)
174-
sol = sp.optimize.minimize(self.fun, x0=self.x0,
175-
jac=lambda x: self._gradprox(x, self.tau),
176-
method='L-BFGS-B', callback=callback,
177-
options=dict(maxiter=15))
174+
sol = sp.optimize.minimize(lambda x: self._funprox(x, self.tau),
175+
x0=self.x0,
176+
jac=lambda x: self._gradprox(x, self.tau),
177+
method='L-BFGS-B', callback=callback,
178+
options=dict(maxiter=15))
178179
sol = sol.x
179180

180181
self.solhist = np.array(self.solhist)

0 commit comments

Comments
 (0)