Skip to content
Snippets Groups Projects
Commit 912e0059 authored by Andreas Mueller's avatar Andreas Mueller
Browse files

Don't use floats to index numpy arrays

parent 6ccdbaf9
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,6 @@ ...@@ -6,7 +6,6 @@
"""Recursive feature elimination for feature ranking""" """Recursive feature elimination for feature ranking"""
import warnings
import numpy as np import numpy as np
from ..utils import check_X_y, safe_sqr from ..utils import check_X_y, safe_sqr
from ..utils.metaestimators import if_delegate_has_method from ..utils.metaestimators import if_delegate_has_method
...@@ -135,7 +134,7 @@ class RFE(BaseEstimator, MetaEstimatorMixin, SelectorMixin): ...@@ -135,7 +134,7 @@ class RFE(BaseEstimator, MetaEstimatorMixin, SelectorMixin):
# Initialization # Initialization
n_features = X.shape[1] n_features = X.shape[1]
if self.n_features_to_select is None: if self.n_features_to_select is None:
n_features_to_select = n_features / 2 n_features_to_select = n_features // 2
else: else:
n_features_to_select = self.n_features_to_select n_features_to_select = self.n_features_to_select
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment