Commit d085672
* Guard against gbarrier_norm == 0 in computation of initial mu
Fixes #1233
If both `gnorm == 0` and `gbarrier_norm == 0`, then `mu = 0/0` which evaluates to `NaN`. I.e., this error is produced if all parameters are unbounded.
Bug was introduced by removing safety catch in commit 9b664c2 "Re-instate old behavior for Fminbox..." leading up to v2.0.1.
I added back the old safety check and a dedicated test for good measure.
* Update test/multivariate/solvers/constrained/fminbox.jl
Extend tests of `initial_mu` and `Fminbox` for additional cases, such as half-bounded parameters.
Co-authored-by: Patrick Kofod Mogensen <patrick.mogensen@gmail.com>
---------
Co-authored-by: Patrick Kofod Mogensen <patrick.mogensen@gmail.com>
1 parent a14f67b commit d085672
2 files changed
Lines changed: 34 additions & 1 deletion
File tree
- src/multivariate/solvers/constrained
- test/multivariate/solvers/constrained
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
267 | 267 | | |
268 | 268 | | |
269 | 269 | | |
270 | | - | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
271 | 277 | | |
272 | 278 | | |
273 | 279 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
181 | 181 | | |
182 | 182 | | |
183 | 183 | | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
184 | 211 | | |
185 | 212 | | |
186 | 213 | | |
| |||
0 commit comments