We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dda0df6 commit f7f4f62Copy full SHA for f7f4f62
sklearn/ensemble/_forest.py
@@ -774,11 +774,13 @@ def _validate_X_predict(self, X):
774
"""
775
Validate X whenever one tries to predict, apply, predict_proba."""
776
check_is_fitted(self)
777
- if self.estimators_[0]._support_missing_values(X):
778
- ensure_all_finite = "allow-nan"
779
- else:
780
- ensure_all_finite = True
+ # if self.estimators_[0]._support_missing_values(X):
+ # ensure_all_finite = "allow-nan"
+ # else:
+ # ensure_all_finite = True
781
782
+ # Always allow NaNs:
783
+ ensure_all_finite = "allow-nan"
784
X = validate_data(
785
self,
786
X,
0 commit comments