def fitLineLSQ(pts):
    n = len(pts)
    a = np.ones((n,2))
    for i in range(n):
        a[i,0] = pts[i,0]
    line = lstsq(a,pts[:,1])[0]
    return line
returns a line fit with least squares. Fails for vertical lines
dataset/ETHPy150Open google/roboto/scripts/lib/fontbuild/alignpoints.py/fitLineLSQ