Skip to content

FIX wrong usage and occurrence of string tag #14043

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jun 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion sklearn/impute/_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -668,4 +668,4 @@ def fit_transform(self, X, y=None):

def _more_tags(self):
return {'allow_nan': True,
'X_types': ['2darray', 'str']}
'X_types': ['2darray', 'string']}
2 changes: 1 addition & 1 deletion sklearn/utils/estimator_checks.py
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ def check_dtype_object(name, estimator_orig):
if "Unknown label type" not in str(e):
raise

if 'str' not in tags['X_types']:
if 'string' not in tags['X_types']:
X[0, 0] = {'foo': 'bar'}
msg = "argument must be a string.* number"
assert_raises_regex(TypeError, msg, estimator.fit, X, y)
Expand Down