The model you're fitting is linear, so we don't really need curve fit. Let's look at the design matrix. In [1]: import numpy as np In [2]: from scipy import optimize In [3]: np.set_printoptions(linewidth=150) In [4]: y_dy_x1_x2=np.array([[3.595, 8740.28, 6391.76, 13958...