fork(1) download
  1. from scipy import stats
  2.  
  3. x = [2022,2023]
  4. y = [117000000000,136000000000]
  5.  
  6. slope,intercept,r,p,std_err = stats.linregress(x,y)
  7.  
  8. def myfunc(x):
  9. return slope * x + intercept
  10.  
  11. print(myfunc(2019))
Success #stdin #stdout 0.54s 64668KB
stdin
Standard input is empty
stdout
60000000000.0