Skip to content

Commit

Permalink
predictions are float but np.bincount can only be used on integers, t…
Browse files Browse the repository at this point in the history
…hus an error comes out when using it
  • Loading branch information
alvarouc committed Nov 12, 2015
1 parent ce90ccb commit a161f2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sklearn/ensemble/voting_classifier.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def predict(self, X):
np.argmax(np.bincount(x,
weights=self.weights)),
axis=1,
arr=predictions)
arr=predictions.astype('int'))

maj = self.le_.inverse_transform(maj)

Expand Down

0 comments on commit a161f2c

Please sign in to comment.