`f0` Passed Has More Than 1 Dimension. - Fmin_l_bfgs_b
I want to find parameters which minimalize a function but I get an error. So far use scipy.optimize.fmin but I want to add bounds for every argument. This is my code def Kou_calib
Solution 1:
Maybe it's due to the dimension of the return matrix of your Kou_error_function
function, sample add .ravel()
or .flatten()
to the end of function return.
Like:
def Kou_error_function(x,obs,arg):
err = x*arg-obs
return y.ravel()
Solution 2:
Works with scipy version 1.4.1
pip install --upgrade scipy==1.4.1
Post a Comment for "`f0` Passed Has More Than 1 Dimension. - Fmin_l_bfgs_b"