Least square fit a 2D line?

I realize I could use numpy to find the line like so: import numpy as np import matplotlib.pyplot as plt a = np.arr...