Computational Physics, Python, Linear Algebra, Math, Mathematics.
b=2.2 . We will plot the data points and the regression line: x = np.linspace(-1, 5, 1000) y = coefs[0]*x + coefs[1] plt.plot(A[:, 0], b, '*') plt.plot(x, y) plt.xlim(-1., 6) plt.ylim(-0.5, 5.5) plt.show() You can also do the fit with the Numpy polyfit() to check the parameters: np.polyfit(A[:, 0],