Skip to content

Commit ddc1740

Browse files
committed
fix PolynomialFeatures.powers_ in python 0.16.1
1 parent 3fa684d commit ddc1740

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sklearn/preprocessing/data.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
from ..utils.extmath import row_norms
2121
from ..utils.extmath import _incremental_mean_and_var
2222
from ..utils.fixes import combinations_with_replacement as combinations_w_r
23+
from ..utils.fixes import bincount
2324
from ..utils.sparsefuncs_fast import (inplace_csr_row_normalize_l1,
2425
inplace_csr_row_normalize_l2)
2526
from ..utils.sparsefuncs import (inplace_column_scale,
@@ -1179,7 +1180,7 @@ def powers_(self):
11791180
combinations = self._combinations(self.n_input_features_, self.degree,
11801181
self.interaction_only,
11811182
self.include_bias)
1182-
return np.vstack(np.bincount(c, minlength=self.n_input_features_)
1183+
return np.vstack(bincount(c, minlength=self.n_input_features_)
11831184
for c in combinations)
11841185

11851186
def get_feature_names(self, input_features=None):

0 commit comments

Comments
 (0)