def regress(d, degree=2): # coeffs = polyfit(x, y, degree) # o = OLS(x, y, fitdegree=degree) o = OLS(*d, fitdegree=degree) return [o.get_coefficients()[2], o.get_coefficient_standard_errors()[2]]