title: Python non convex optimization
body: <p>I use the package cvxpy form Python to solve a non convex optimization problem which is given as follows:</p>
  <pre><code>import numpy as np
  import cvxpy as cp
  
  
  
  
  def kl(a,b):
      if a==b:
          return 0.000001
      if b==0:
          return 1000000
      if a==0:
          return -np.log(1-b) 
      return a*np.log(a/b)+(1-a)*np.log((1-a)/(1-b))  
  
  t = 0.5
  q = 0.1
  p = 0.1
  
  d = cp.Variable()
  c = t/(1-t)/(d*kl(a,q))
  
  objective = cp.Minimize(c)
  constraints = [ -np.log((a/q-1)*((1-(1-p)/q))) &gt;= d, d &gt;= 0 ]
  
  prob = cp.Problem(objective,constraints)
  result = prob.solve()
  print(d.value)
  print(constraints[0].dual_value)
  </code></pre>
  <p>I think the package does not like the function in the objective function, but it's just a guess.
  Thank for your help.
  Kind regards</p>