Skip to content

Commit

Permalink
CovModel.fit_variogram: check if init_guess for anis is in given bounds
Browse files Browse the repository at this point in the history
  • Loading branch information
MuellerSeb committed Mar 21, 2021
1 parent d6ad3d8 commit 6ff4f79
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions gstools/covmodel/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,9 +398,15 @@ def _init_curve_fit_para(model, para, init_guess, constrain_sill, sill, anis):
)
)
if anis:
low_bounds += [model.anis_bounds[0]] * (model.dim - 1)
top_bounds += [model.anis_bounds[1]] * (model.dim - 1)
init_guess_list += init_guess["anis"]
for i in range(model.dim - 1):
low_bounds.append(model.anis_bounds[0])
top_bounds.append(model.anis_bounds[1])
init_guess_list.append(
_init_guess(
bounds=[low_bounds[-1], top_bounds[-1]],
default=init_guess["anis"][i],
)
)
return (low_bounds, top_bounds), init_guess_list


Expand Down

0 comments on commit 6ff4f79

Please sign in to comment.