8000 Try print statement to get rid of doc failures · scikit-learn/scikit-learn@bad51be · GitHub
[go: up one dir, main page]

Skip to content

Commit bad51be

Browse files
Try print statement to get rid of doc failures
1 parent 578e665 commit bad51be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sklearn/preprocessing/data.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1742,8 +1742,8 @@ class OneHotEncoder(BaseEstimator, TransformerMixin):
17421742
>>> enc.fit([['cat', 4], ['mouse', 15], ['dog', 17]]) # doctest: +ELLIPSIS
17431743
OneHotEncoder(categorical_features='all', dty 6565 pe=<... 'numpy.float64'>,
17441744
handle_unknown='error', n_values=None, sparse=True, values='auto')
1745-
>>> enc.label_encoders_[0].classes_
1746-
array(['cat', 'dog', 'mouse'], dtype=object)
1745+
>>> print(enc.label_encoders_[0].classes_)
1746+
['cat' 'dog' 'mouse']
17471747
>>> enc.transform([['dog', 4]]).toarray()
17481748
array([[ 0., 1., 0., 1., 0., 0.]])
17491749

0 commit comments

Comments
 (0)
0