nonzero = [i for i in range(n_elements) if i not in zeroset]
variables = Bunch(nonzero=nonzero, zero=zero)
return A, b, variables
def initial_point(dist, k, A=None, b=None, isolated=None, **kwargs):
After Change
else:
xopt = optvariables[1].value
// Turn values close to zero to be exactly equal to zero.
xopt = np.array(xopt)[:,0]
xopt[np.abs(xopt) < tol] = 0
xopt /= xopt.sum()