File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -458,7 +458,7 @@ class ML::SparseMatrixRecommender
458458 # #========================================================
459459 # # Apply tag type weights
460460 # #========================================================
461- method apply-tag-type-weights ($ weights ) {
461+ method apply-tag-type-weights ($ weights , Numeric : D : default( : $ default-weight ) = 1 ) {
462462 my @ weights-list ;
463463
464464 if $ weights ~~ (Array : D | List : D | Seq : D ) {
@@ -475,7 +475,7 @@ class ML::SparseMatrixRecommender
475475 if @ unknown-keys ;
476476
477477 for % ! matrices . keys -> $ key {
478- my $ w = $ weights {$ key } // 1 ;
478+ my $ w = $ weights {$ key } // $ default-weight ;
479479 @ weights-list . append ( $ w xx % ! matrices {$ key }. columns-count );
480480 }
481481 } else {
You can’t perform that action at this time.
0 commit comments