We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 092bc88 commit 599f5d7Copy full SHA for 599f5d7
cvxpy/tests/nlp_tests/test_nlp_solvers.py
@@ -449,6 +449,16 @@ def test_geo_mean2(self, solver):
449
checker = DerivativeChecker(prob)
450
checker.run_and_assert()
451
452
+ def test_div_composition(self, solver):
453
+ x = cp.Variable(nonneg=True, bounds=[1, 5])
454
+ prob = cp.Problem(cp.Maximize(cp.exp(1 / x)))
455
+ prob.solve(solver=solver, nlp=True)
456
+ x_true = 1.0
457
+ assert prob.status == cp.OPTIMAL
458
+ assert np.allclose(x.value, x_true)
459
+ checker = DerivativeChecker(prob)
460
+ checker.run_and_assert()
461
+
462
def test_clnlbeam(self, solver):
463
N = 1000
464
h = 1 / N
0 commit comments