python solve the simultaneous equations with solutions > 0
For each parameter p, define p_ = p - eps for very small eps.
Solve for {p_}, then assign p = p_ + eps and you get all parameters above zero.
In practice, just add epsilon to the solution.
If that doesn't suffice, please explain why.
I have simultaneous equations(with many equations), which are no solution, and I need to find a best solutions. Each element of solution must>0 (no 0 or negative).
np.linalg.lstsq could get the best solution, but may also appear negative elements.
scipy.optimize.nnls could get best solution without negative elements, but may also appear 0.
How can I restrict to get the best solution with each element>0 or is there any other function can use to solve the problem?