diff --git a/python/cuml/neighbors/nearest_neighbors.pyx b/python/cuml/neighbors/nearest_neighbors.pyx index a35943a8a2..ac5b15c03f 100644 --- a/python/cuml/neighbors/nearest_neighbors.pyx +++ b/python/cuml/neighbors/nearest_neighbors.pyx @@ -362,7 +362,7 @@ class NearestNeighbors(Base, if is_sparse(X): valid_metrics = cuml.neighbors.VALID_METRICS_SPARSE - value_metric_str = "_SPARSE" + valid_metric_str = "_SPARSE" self.X_m = SparseCumlArray(X, convert_to_dtype=cp.float32, convert_format=False) self.n_rows = self.X_m.shape[0]