Solve conflic with num-traits (#130)
* Solve conflic with num-traits * Fix clippy warnings Co-authored-by: Luis Moreno <morenol@users.noreply.github.com>
This commit is contained in:
@@ -161,7 +161,7 @@ impl<T: RealNumber> CategoricalNBDistribution<T> {
|
||||
let y_max = y
|
||||
.iter()
|
||||
.max()
|
||||
.ok_or_else(|| Failed::fit(&"Failed to get the labels of y.".to_string()))?;
|
||||
.ok_or_else(|| Failed::fit("Failed to get the labels of y."))?;
|
||||
|
||||
let class_labels: Vec<T> = (0..*y_max + 1)
|
||||
.map(|label| T::from(label).unwrap())
|
||||
|
||||
Reference in New Issue
Block a user