Fix clippy error
This commit is contained in:
@@ -656,11 +656,9 @@ impl<TX: FloatNumber + PartialOrd, TY: Number + Ord, X: Array2<TX>, Y: Array1<TY
|
|||||||
for tree in self.trees.as_ref().unwrap().iter() {
|
for tree in self.trees.as_ref().unwrap().iter() {
|
||||||
let tree_predictions: Y = tree.predict(x).unwrap();
|
let tree_predictions: Y = tree.predict(x).unwrap();
|
||||||
|
|
||||||
let mut i = 0;
|
for (i, &class_idx) in tree_predictions.iterator(0).enumerate() {
|
||||||
for &class_idx in tree_predictions.iterator(0) {
|
|
||||||
let class_ = class_idx.to_usize().unwrap();
|
let class_ = class_idx.to_usize().unwrap();
|
||||||
probas.add_element_mut((i, class_), 1.0);
|
probas.add_element_mut((i, class_), 1.0);
|
||||||
i += 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user