Commit 8d4263a
authored
Fix NaN issue for Learner1D R -> R^n (#340)
If a function evaluates over a point where it is not defined, NaN will be returned.
In the case of a function R -> R^n, it caused `_update_scale` to compute `self._scale[1] = nan`,
which in turns led to the evaluation of the function on all other points to be NaN, causing an
infinite loop, as reported in issue #339.
Using `np.nanmin` and `np.nanmax` in place of `np.min` and `np.max` seems to solve the issue.1 parent ef3b1c5 commit 8d4263a
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
464 | 464 | | |
465 | 465 | | |
466 | 466 | | |
467 | | - | |
468 | | - | |
| 467 | + | |
| 468 | + | |
469 | 469 | | |
470 | 470 | | |
471 | 471 | | |
| |||
0 commit comments