Skip to content

Commit 094ca44

Browse files
committed
Adapt tests to new COBYLA implementation
1 parent af982ea commit 094ca44

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/sage/numerical/optimize.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -519,9 +519,9 @@ def minimize_constrained(func, cons, x0, gradient=None, algorithm='default', **a
519519
sage: x, y = var('x y')
520520
sage: f(x,y) = (100 - x) + (1000 - y)
521521
sage: c(x,y) = x + y - 479 # > 0
522-
sage: minimize_constrained(f, [c], [100, 300])
522+
sage: minimize_constrained(f, [c], [100, 300]) # random
523523
(805.985..., 1005.985...)
524-
sage: minimize_constrained(f, c, [100, 300])
524+
sage: minimize_constrained(f, c, [100, 300]) # random
525525
(805.985..., 1005.985...)
526526
527527
If ``func`` is symbolic, its minimizer should be in the same order
@@ -532,7 +532,7 @@ def minimize_constrained(func, cons, x0, gradient=None, algorithm='default', **a
532532
sage: f(y,x) = x - y
533533
sage: c1(y,x) = x
534534
sage: c2(y,x) = 1-y
535-
sage: minimize_constrained(f, [c1, c2], (0,0))
535+
sage: minimize_constrained(f, [c1, c2], (0,0)) # abs tol 1e-04
536536
(1.0, 0.0)
537537
"""
538538
from sage.structure.element import Expression

0 commit comments

Comments
 (0)