8000 FIX wrong usage and occurrence of string tag (#14043) · scikit-learn/scikit-learn@8fe89ea · GitHub
[go: up one dir, main page]

Skip to content

Commit 8fe89ea

Browse files
glemaitreqinhanmin2014
authored andcommitted
FIX wrong usage and occurrence of string tag (#14043)
1 parent d91b0f3 commit 8fe89ea

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

sklearn/impute/_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -668,4 +668,4 @@ def fit_transform(self, X, y=None):
668668

669669
def _more_tags(self):
670670
return {'allow_nan': True,
671-
'X_types': ['2darray', 'str']}
671+
'X_types': ['2darray', 'string']}

sklearn/utils/estimator_checks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ def check_dtype_object(name, estimator_orig):
663663
if "Unknown label type" not in str(e):
664664
raise
665665

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

0 commit comments

Comments
 (0)
0