Commit e9a4366
committed
refactor: apply refactor-cleaner review findings
- Remove panic="abort" from [profile.release] to preserve PyO3's panic
catch mechanism (prevents Python process crash on Rust panic)
- Eliminate xtx pre.clone() by building posterior_precision directly from
xtx_ref + prior_precision (avoids k*k Vec clone per iteration)
- Change xtx_precomputed type from Option<&Vec<Vec<f64>>> to
Option<&[Vec<f64>]> (idiomatic Rust, use .as_deref() at call sites)
- Skip xtx_static computation when spike-and-slab is active (coordinate-
wise sampling does not use XtX)
- Remove extra blank lines left from scale_matrix deletion1 parent ed00fd0 commit e9a4366
2 files changed
Lines changed: 20 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
319 | 319 | | |
320 | 320 | | |
321 | 321 | | |
322 | | - | |
| 322 | + | |
323 | 323 | | |
324 | 324 | | |
325 | 325 | | |
| |||
422 | 422 | | |
423 | 423 | | |
424 | 424 | | |
425 | | - | |
426 | | - | |
427 | | - | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
428 | 428 | | |
429 | 429 | | |
430 | 430 | | |
| |||
513 | 513 | | |
514 | 514 | | |
515 | 515 | | |
516 | | - | |
| 516 | + | |
517 | 517 | | |
518 | 518 | | |
519 | 519 | | |
| |||
534 | 534 | | |
535 | 535 | | |
536 | 536 | | |
537 | | - | |
| 537 | + | |
538 | 538 | | |
539 | 539 | | |
540 | 540 | | |
| |||
553 | 553 | | |
554 | 554 | | |
555 | 555 | | |
556 | | - | |
| 556 | + | |
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| |||
821 | 821 | | |
822 | 822 | | |
823 | 823 | | |
824 | | - | |
| 824 | + | |
825 | 825 | | |
826 | 826 | | |
827 | 827 | | |
828 | | - | |
829 | | - | |
830 | | - | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
| 833 | + | |
| 834 | + | |
831 | 835 | | |
832 | 836 | | |
833 | 837 | | |
| |||
846 | 850 | | |
847 | 851 | | |
848 | 852 | | |
849 | | - | |
850 | | - | |
851 | | - | |
852 | | - | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
853 | 858 | | |
854 | 859 | | |
855 | 860 | | |
| |||
1139 | 1144 | | |
1140 | 1145 | | |
1141 | 1146 | | |
1142 | | - | |
1143 | | - | |
1144 | 1147 | | |
1145 | 1148 | | |
1146 | 1149 | | |
| |||
0 commit comments