Skip to content

Commit

Permalink
MAINT Remove unused condition (scikit-learn#8778)
Browse files Browse the repository at this point in the history
  • Loading branch information
qinhanmin2014 authored and jnothman committed Apr 23, 2017
1 parent 2beefbc commit 834608e
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions sklearn/tree/tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,10 +369,6 @@ def fit(self, X, y, sample_weight=None, check_input=True,

def _validate_X_predict(self, X, check_input):
"""Validate X whenever one tries to predict, apply, predict_proba"""
if self.tree_ is None:
raise NotFittedError("Estimator not fitted, "
"call `fit` before exploiting the model.")

if check_input:
X = check_array(X, dtype=DTYPE, accept_sparse="csr")
if issparse(X) and (X.indices.dtype != np.intc or
Expand Down

0 comments on commit 834608e

Please sign in to comment.