title: CVXPY vector constraints
body: <p>I am looking to implement constraints on my optimization variable :</p>
  
  <p>X=variable(2)</p>
  
  <p>How can I specify constraints on X components, like "X[i] &lt;= 1" for example, which I tried but don't seem to work" ? I did not find anything in the cvxpy documentation on this specific case, although it seems pretty basic...</p>
  
  <p>I tried this simple example :</p>
  
  <pre><code>import cvxpy
  
  X=variable(2)
  
  constraints = [x[0] &lt;= 5,
                 x[1] &lt;= 5]
  
  obj=Maximize(x[0]+x[1])
  
  Pb=Problem(obj, constraints)
  </code></pre>
  
  <p>but cvxpy does not find any solution</p>
  
  <p>Thanks !</p>