Python Minimize Least Square Line