Skip to content

Commit 5a7dc7e

Browse files
authored
Fix: wrong Monte Carlo sampling
1 parent 18cdf04 commit 5a7dc7e

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

uncertaintyx/fit/randomsampling.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,9 +224,9 @@ def rvar():
224224
success_count = 0
225225

226226
for i in range(self._how_many):
227-
dx = self._perturbator.perturb_x(x, ux, **kwargs)
228-
dy = self._perturbator.perturb_y(y, uy, **kwargs)
229-
res = self._fitting.fit(f, x + dx, y + dy, ux=ux, uy=uy, **kwargs)
227+
x_ = self._perturbator.perturb_x(x, ux, **kwargs)
228+
y_ = self._perturbator.perturb_y(y, uy, **kwargs)
229+
res = self._fitting.fit(f, x_, y_, ux=ux, uy=uy, **kwargs)
230230
if not hasattr(res, "info") or res.info == 0:
231231
popt[i] = res.popt
232232
cost[i] = res.cost

0 commit comments

Comments
 (0)