From e5d42e87c5c43055fb189008150a254edfa3f2b8 Mon Sep 17 00:00:00 2001 From: Tony-HYX <605698554@qq.com> Date: Tue, 2 Jan 2024 12:16:59 +0800 Subject: [PATCH] [ENH] Add docstring to tab_data_to_tuple function --- abl/utils/utils.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/abl/utils/utils.py b/abl/utils/utils.py index 1e10c21..601c7a6 100644 --- a/abl/utils/utils.py +++ b/abl/utils/utils.py @@ -158,6 +158,20 @@ def tab_data_to_tuple(X, y, reasoning_result = 0): ''' Convert a tabular data to a tuple by adding a dimension to each element of X and y. The tuple contains three elements: data, label, and reasoning result. If X is None, return None. + + Parameters + ---------- + X : list or other type + The data. + y : list or other type + The label. + reasoning_result : Any, optional + The reasoning result, by default 0. + + Returns + ------- + Tuple[List[List[Any]], List[List[Any]], List[Any]] + A tuple of (data, label, reasoning_result). ''' if X is None: return None