Python fmin - TypeError: float() argument must be a string or a number, not 'tuple' ValueError: setting an array element with a sequence
I am trying to minimize my likelihood function with the par parameter only, the rest: n,T,r,log_x, gft_y are supposed to be fixed in the optimization. When I put them in the args to fix them I get back the following errors: TypeError: float() argument must be a string or a number, not 'tuple' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "C:\Users\phelg\AppData\Local\Temp/ipykernel_16344/2785678381.py", line 4, in <module> result = fmin(mrg_lik,initial_guess, args) File "C:\Users\phelg\anaconda3\envs\Financial_Econometrics\lib\site-packages\scipy\optimize\optimize.py", line 580, in fmin res = _minimize_neldermead(func, x0, args, callback=callback, **opts) File "C:\Users\phelg\anaconda3\envs\Financial_Econometrics\lib\site-packages\scipy\optimize\optimize.py", line 750, in _minimize_neldermead fsim[k] = func(sim[k]) ValueError: setting an array element w...