Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
cvxpy / reductions / dgp2dcp / util.py
Size: Mime:
from cvxpy.atoms.affine.vec import vec


# the Python `sum` function is a reduction with initial value 0.0,
# resulting in a non-DGP expression
def explicit_sum(expr):
    x = vec(expr)
    summation = x[0]
    for xi in x[1:]:
        summation += xi
    return summation