<p dir="auto">Please:</p>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Check for duplicate issues.</li>
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> Provide a complete example of how to reproduce the bug, wrapped in triple backticks like this:</li>
</ul>
<div class="highlight highlight-source-python notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import jax.numpy as jnp
print(jnp.arange(10))
# [0 1 2 3 4 5 6 7 8 9]"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s1">jax</span>.<span class="pl-s1">numpy</span> <span class="pl-k">as</span> <span class="pl-s1">jnp</span>
<span class="pl-en">print</span>(<span class="pl-s1">jnp</span>.<span class="pl-en">arange</span>(<span class="pl-c1">10</span>))
<span class="pl-c"># [0 1 2 3 4 5 6 7 8 9]</span></pre></div>
<ul class="contains-task-list">
<li class="task-list-item"><input type="checkbox" id="" disabled="" class="task-list-item-checkbox"> If applicable, include full error messages/tracebacks.</li>
</ul>
<p dir="auto">When defining a list of constraints as an input for the scipy.minimize (using a default 'SLSQP' method), repeated or redundant constraints will raise messages like "Singular matrix C in LSQ subproblem", and a solution is not achieved, when in fact, these repeated/redundant constraints should just be ignored.</p>
<p dir="auto">This is very relevant when one has to define multiple inequality and equality constraints, which sometimes partially overlap for some of the constraints.</p>
<p dir="auto">To replicate the problem: Use a working example of a constrained minimization problem, but now duplicate the list of constraints (two times more constraints, but all of them repeated).</p>
<p dir="auto">Example where this is useful: Forcing a bivariate polynomial f(x,y) of a certain degree, to be f(0,y)=0 and forcing it's first derivative with respect to x, to be d f(x=1,y) / dx = 0, will provide a large set of equality constraints where a few of them are redundant.</p>