From 7164b32c23a2ad511863bb93f61d9d23869f1516 Mon Sep 17 00:00:00 2001 From: Manisha Gangadevi Date: Tue, 27 Jan 2026 00:02:18 +0530 Subject: [PATCH] Respect y_int flag in check_Xy input validation --- mlxtend/utils/checking.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mlxtend/utils/checking.py b/mlxtend/utils/checking.py index 38ef1e635..35ba53cd7 100644 --- a/mlxtend/utils/checking.py +++ b/mlxtend/utils/checking.py @@ -16,7 +16,7 @@ def check_Xy(X, y, y_int=True): if not isinstance(y, np.ndarray): raise ValueError("y must be a NumPy array. Found %s" % type(y)) - if "int" not in str(y.dtype): + if y_int and "int" not in str(y.dtype): raise ValueError( "y must be an integer array. Found %s. " "Try passing the array as y.astype(np.int_)" % y.dtype