Skip to content

Commit

Permalink
data is series :)
Browse files Browse the repository at this point in the history
  • Loading branch information
martinvonk committed Oct 2, 2023
1 parent 1797067 commit 9150b7e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/spei/si.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ def compute_si_ppf(
dfval = group_yearly_df(series=series)
si = Series(index=index, dtype=float) # type: Series
for _, grval in dfval.groupby(Grouper(freq=inf_freq)):
data = get_data_series(grval).values
data = get_data_series(grval)
if not sgi:
if prob_zero:
cdf = compute_cdf_probzero(data=data, dist=dist)
cdf = compute_cdf_probzero(data=data.values, dist=dist)
else:
cdf = compute_cdf(data=data, dist=dist)
cdf = compute_cdf(data=data.values, dist=dist)
else:
cdf = compute_cdf_nsf(data=data)
cdf = compute_cdf_nsf(data=data.values)
ppf = norm.ppf(cdf)
si.loc[data.index] = ppf
return si
Expand Down

0 comments on commit 9150b7e

Please sign in to comment.