Hi I am working with both the SLSQP solver on python and diffev2 which is part of the mystic package.
For multiple parameters the format shown below works:
bnds = ((0, 1e3), (0, 1e-4))
optimize.minimize(Error, [1e-8, 1e-7], args=(E, Bt, L, dt, TotT, nz, Co, Exmatrix), method = 'SLSQP', bounds = bnds)
I want to optimize only one parameter and that is when I run into the error: SLSQP Error: the length of bounds is not compatible with that of x0. I use the syntax shown below:
bnds = ((1e-9, 1e-2))
optimize.minimize(Error, [1e-8], args=(U, E, Bt, L, dt, TotT, nz, Co, Exmatrix), method = 'SLSQP', bounds = bnds)
I am not sure what is wrong, as I have only one tuple pair in the bnds variable and one guess, not sure what is wrong.