title: Define boundaries or constraints for scipy optimize
body: <p>I am confused about boundaries and constaints in <code>scipy.optimize</code></p>
  <pre><code>def objective(x):
      y = x*x - 40*x
      return y
  
  def constraint1(x):
      x &lt; 500
      return x
  
  # initial guesses
  n = 1
  x0 = np.zeros(n)
  x0[0] = 10
  
  # show initial objective
  print('Initial Objective: ' + str(objective(x0)))
  
  # optimize
  b = (1.0,500.0)
  # b = (None,None)
  bnds = (b)
  con1 = {'type': 'ineq', 'fun': constraint1}
  cons = ([con1])
  solution = minimize(objective,x0,method='SLSQP',\
                  bounds=bnds,constraints=cons)
  </code></pre>
  <p>How do I set that the <code>x</code> can only be certain values for example <code>x = [10,36,258,500]</code>?</p>