Skip to content

Commit 34872e9

Browse files
jnothmanHamzeh Alsalhi
authored andcommitted
DOC Note shape of binary binarized output
1 parent eec979c commit 34872e9

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

sklearn/preprocessing/label.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,6 +287,7 @@ def transform(self, y):
287287
Returns
288288
-------
289289
Y : numpy array of shape [n_samples, n_classes]
290+
Shape will be [n_samples, 1] for binary problems.
290291
"""
291292
self._check_fitted()
292293

@@ -393,6 +394,7 @@ def label_binarize(y, classes, multilabel=False, neg_label=0, pos_label=1):
393394
Returns
394395
-------
395396
Y : numpy array of shape [n_samples, n_classes]
397+
Shape will be [n_samples, 1] for binary problems.
396398
397399
Examples
398400
--------

0 commit comments

Comments
 (0)