How to pass multiple constants and variables to Scipy Optimize?
问题 I am trying to fit model data (calculated from eR ) to my experimental data e_exp . I am not quite sure how to pass constants and variables to func . import numpy as np import math from scipy.optimize import curve_fit, least_squares, minimize f_exp = np.array([1, 1.6, 2.7, 4.4, 7.3, 12, 20, 32, 56, 88, 144, 250000]) e_exp = np.array([7.15, 7.30, 7.20, 7.25, 7.26, 7.28, 7.32, 7.25, 7.35, 7.34, 7.37, 13.55]) ezero = np.min(e_exp) einf = np.max(e_exp) ig_fc = 500 ig_alpha = 0.35 def CCER(einf,