diff --git a/inputs/distributions.py b/inputs/distributions.py index 3577eae..9bb60f8 100644 --- a/inputs/distributions.py +++ b/inputs/distributions.py @@ -38,13 +38,13 @@ df = pd.read_excel('IPCC AR6.xlsx', index_col=[0, 1, 2, 3, 4]) df = df.sort_index() dff = df.loc[838, 'total', 'medium', 'ssp585'].T dff.index.name = 'year' -percentiles = dff.columns.to_numpy() / 100 +percentiles = dff.columns.values / 100 # Make SLR relative to 2020 level (at the 50th percentile) dff -= dff.loc[2020, 50] for i, row in dff.iterrows(): - values = row.to_numpy() + values = row.values # Fit normal distribution loc, scale = optimize.curve_fit(norm_cdf, values, percentiles)[0]