Skip to content

Commit c96821d

Browse files
committed
Fix test
1 parent a753248 commit c96821d

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/svm/svc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,6 +719,9 @@ impl<'a, T: RealNumber, M: Matrix<T>, K: Kernel<T, M::RowVector>> Optimizer<'a,
719719
idx_2: Option<usize>,
720720
cache: &mut Cache<'_, T, M, K>,
721721
) -> Option<(usize, usize, T)> {
722+
if self.sv.is_empty() {
723+
return None;
724+
}
722725
match (idx_1, idx_2) {
723726
(None, None) => {
724727
if self.gmax > -self.gmin {

0 commit comments

Comments
 (0)