Skip to content

Commit 5ed332d

Browse files
committed
Predict no longer requires mut
1 parent c983379 commit 5ed332d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ impl SupervisedModel {
293293
/// #[cfg(any(feature = "csv"))]
294294
/// model.predict("data/diabetes_without_target.csv");
295295
/// ```
296-
pub fn predict<X>(&mut self, x: X) -> Vec<f32>
296+
pub fn predict<X>(&self, x: X) -> Vec<f32>
297297
where
298298
X: IntoFeatures,
299299
{
@@ -625,7 +625,7 @@ impl SupervisedModel {
625625
};
626626
}
627627

628-
fn predict_blended_model(&mut self, x: &DenseMatrix<f32>, algo: Algorithm) -> Vec<f32> {
628+
fn predict_blended_model(&self, x: &DenseMatrix<f32>, algo: Algorithm) -> Vec<f32> {
629629
// Make the data
630630
let mut meta_x: Vec<Vec<f32>> = Vec::new();
631631
for i in 0..self.comparison.len() {

0 commit comments

Comments
 (0)