Skip to content

Commit b537a20

Browse files
committed
iter
1 parent e5ce7a6 commit b537a20

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

imblearn/utils/_validation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -129,12 +129,12 @@ def check_target_type(y, indicate_one_vs_all=False, return_unique=False):
129129
y : ndarray
130130
The returned target.
131131
132-
y_unique : ndarray
133-
The unique values in `y`.
134-
135132
is_one_vs_all : bool, optional
136133
Indicate if the target was originally encoded in a one-vs-all fashion.
137134
Only returned if ``indicate_multilabel=True``.
135+
136+
y_unique : ndarray
137+
The unique values in `y`.
138138
"""
139139
type_y = type_of_target(y)
140140
if type_y == "multilabel-indicator":
@@ -154,7 +154,7 @@ def check_target_type(y, indicate_one_vs_all=False, return_unique=False):
154154
if return_unique:
155155
output += [unique(y)]
156156

157-
return output
157+
return output[0] if len(output) == 1 else tuple(output)
158158

159159

160160
def _sampling_strategy_all(y, sampling_type):

0 commit comments

Comments
 (0)