Skip to content

Commit 75decb5

Browse files
committed
fix: union again
1 parent f1528cb commit 75decb5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

model2vec/inference/model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ def evaluate_single_or_multi_label(
300300
predictions_transformed = mlb.transform(predictions)
301301
else:
302302
if all(isinstance(label, (str, int)) for label in y):
303-
y = cast(list[str] | list[int], y)
303+
y = cast(Union[list[str], list[int]], y)
304304
classes = sorted(set(y))
305305
y_transformed = np.array(y)
306306
predictions_transformed = np.array(predictions)

0 commit comments

Comments
 (0)