File tree Expand file tree Collapse file tree
algorithms/linfa-lars/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -354,11 +354,11 @@ fn lars_path<F: Float>(
354354
355355 n_iter += 1 ;
356356
357- if n_iter >= coefs. shape ( ) [ 0 ] {
357+ if n_iter >= coefs. nrows ( ) {
358358 let add_features = 2 * ( max_features - n_active) . max ( 1 ) ;
359359
360360 let mut new_coefs = Array2 :: < F > :: zeros ( ( n_iter + add_features, n_features) ) ;
361- let old_shape = coefs. shape ( ) [ 0 ] ;
361+ let old_shape = coefs. nrows ( ) ;
362362 new_coefs. slice_mut ( s ! [ ..old_shape, ..] ) . assign ( & coefs) ;
363363
364364 coefs = new_coefs;
@@ -584,10 +584,10 @@ mod tests {
584584 let eps = 1e-3 ;
585585 let threshold = cap_c - eps;
586586 let ocur = cov. iter ( ) . filter ( |v| v. abs ( ) >= threshold) . count ( ) ;
587- if index < x. shape ( ) [ 1 ] {
587+ if index < x. ncols ( ) {
588588 assert ! ( ocur == index + 1 ) ;
589589 } else {
590- assert ! ( ocur == x. shape ( ) [ 1 ] ) ;
590+ assert ! ( ocur == x. ncols ( ) ;
591591 }
592592 }
593593 }
You can’t perform that action at this time.
0 commit comments