Commit 8842eb5
[BUG] fix bare print on non-convergence and malformed ValueError format
- Replace `print("did not converge")` with `warnings.warn()` so that
non-convergence is surfaced through Python's warning system instead of
printing to stdout. This allows users to filter/capture the message
programmatically.
- Fix string formatting bug in `_estimate_GCV_UBRE` where `format(gamma)`
was passed as a separate argument to `ValueError` instead of being
interpolated into the message string, resulting in a confusing tuple
error message like `('msg {}', '0.5')`.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>1 parent b6a48ab commit 8842eb5
2 files changed
Lines changed: 31 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
818 | 818 | | |
819 | 819 | | |
820 | 820 | | |
821 | | - | |
| 821 | + | |
| 822 | + | |
| 823 | + | |
| 824 | + | |
| 825 | + | |
822 | 826 | | |
823 | 827 | | |
824 | 828 | | |
| |||
1194 | 1198 | | |
1195 | 1199 | | |
1196 | 1200 | | |
1197 | | - | |
1198 | | - | |
| 1201 | + | |
1199 | 1202 | | |
1200 | 1203 | | |
1201 | 1204 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
467 | 467 | | |
468 | 468 | | |
469 | 469 | | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
470 | 495 | | |
471 | 496 | | |
472 | 497 | | |
| |||
0 commit comments