Browse Source

[ENH] Add docstring to tab_data_to_tuple function

pull/1/head
Tony-HYX 1 year ago
parent
commit
e5d42e87c5
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      abl/utils/utils.py

+ 14
- 0
abl/utils/utils.py View File

@@ -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


Loading…
Cancel
Save