Skip to content

Commit

Permalink
Merge pull request #18 from calpaterson/master
Browse files Browse the repository at this point in the history
Remove workaround for sklearn bug #18
  • Loading branch information
paulgb committed Mar 1, 2015
2 parents 0f14b29 + 1ae47ba commit 7785945
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions sklearn_pandas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,6 @@ def _get_col_subset(self, X, cols):
else:
t = X.as_matrix(cols)

# there is an sklearn bug (#2374) which causes weird behavior
# when 'object' type arrays are passed to labelling functions.
# To get around this, in cases where all columns are strings
# (represnted as object by Pandas), we convert the dtype to
# numpy's string type
if np.all(X.dtypes[cols] == 'object'):
t = np.array(t, dtype='|S')

return t


Expand Down

0 comments on commit 7785945

Please sign in to comment.