Skip to content

Commit 834608e

Browse files
qinhanmin2014jnothman
authored andcommitted
MAINT Remove unused condition (scikit-learn#8778)
1 parent 2beefbc commit 834608e

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

sklearn/tree/tree.py

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -369,10 +369,6 @@ def fit(self, X, y, sample_weight=None, check_input=True,
369369

370370
def _validate_X_predict(self, X, check_input):
371371
"""Validate X whenever one tries to predict, apply, predict_proba"""
372-
if self.tree_ is None:
373-
raise NotFittedError("Estimator not fitted, "
374-
"call `fit` before exploiting the model.")
375-
376372
if check_input:
377373
X = check_array(X, dtype=DTYPE, accept_sparse="csr")
378374
if issparse(X) and (X.indices.dtype != np.intc or

0 commit comments

Comments
 (0)