Implementing Linear Reg in python