From 04d661bdc2957425a3cb707d1e976315655e21de Mon Sep 17 00:00:00 2001 From: Adam Li Date: Mon, 9 Sep 2024 11:08:04 -0400 Subject: [PATCH] Fix Signed-off-by: Adam Li --- treeple/neighbors.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/treeple/neighbors.py b/treeple/neighbors.py index 473b4363f..c95c2968c 100644 --- a/treeple/neighbors.py +++ b/treeple/neighbors.py @@ -5,7 +5,7 @@ from sklearn.base import BaseEstimator, MetaEstimatorMixin from sklearn.exceptions import NotFittedError from sklearn.neighbors import NearestNeighbors -from sklearn.utils.validation import check_is_fitted +from sklearn.utils.validation import check_is_fitted, validate_data from treeple.tree._neighbors import _compute_distance_matrix, compute_forest_similarity_matrix @@ -56,7 +56,7 @@ def fit(self, X, y=None): self : object Fitted estimator. """ - X, y = self._validate_data(X, y, accept_sparse="csc") + X, y = validate_data(self, X, y, accept_sparse="csc") self.estimator_ = copy(self.estimator) try: