I have a question about python scipy.minimize, I know if
x0 = np.array([0.5, 0])
then I can set the bound like this
bnds = ((0, None), (0, None))
but if my x0 has 1000 terms, and I want each of them to be in range (0,5), how should I set my bound?
You can pass an instance of
scipy.optimize.Bounds
: