Skip to content

Commit

Permalink
Merge branch 'fit-mse' of github.com:Ouranosinc/xclim into fit-mse
Browse files Browse the repository at this point in the history
  • Loading branch information
SarahG-579462 committed Feb 14, 2025
2 parents 096715e + 70b3d4e commit 5696215
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/xclim/indices/stats.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def _fitfunc_1d(arr, *, dist, nparams, method, **fitkwargs):
elif method == "MM":
params = dist.fit(x, method="mm", **fitkwargs)
elif method == "MSE":
fitresult = scipy.stats.fit(dist, x, method='mse', **kwargs, **fitkwargs)
fitresult = scipy.stats.fit(dist, x, method="mse", **kwargs, **fitkwargs)
params = fitresult.params
elif method == "PWM":
# lmoments3 will raise an error if only dist.numargs + 2 values are provided
Expand Down Expand Up @@ -137,7 +137,7 @@ def fit(
"MSE": "maximum product of spacings",
"MPS": "maximum product of spacings",
"PWM": "probability weighted moments",
"APP": "approximative method"
"APP": "approximative method",
}
if method not in method_name:
raise ValueError(f"Fitting method not recognized: {method}")
Expand Down

0 comments on commit 5696215

Please sign in to comment.