Documentation

QuadExpr.remove()


QuadExpr.remove()

remove ( item )

Remove a term from a quadratic expression.

Arguments:

item: If item is an integer, then the quadratic term stored at index item of the expression is removed. If item is a Var, then all quadratic terms that involve item are removed.

Example usage:

  expr = x * x + 2 * y * y + z
  expr.remove(x)