4

You could use a least-square solver with bounds. import numpy as np from scipy.optimize import lsq_linear W = np.array([ [1., 0., 0., -1.76690464, 0., -1.76690464, 0., -1.76690464, 0., -1.76690464], [0., -38.43501272, 1., 0., 0., -38.43501272, 0., -38.43501272, 0., -38.43501272], [0., -41.64051053, 0., -41....


Only top voted, non community-wiki answers of a minimum length are eligible