def getweights(params, cov):
(m,n) = np.shape(params)
P = matrix(cov)
q = matrix([0.] * m, (m, 1))
A = matrix(params.T)
b = matrix([0.] * n, (n, 1))
res = solvers.qp(P=P, q=q, A=A, b=b)
return res['x']
This always returns zero for all x. I want to add a non zero condition to each x. Could someone please help me?