Skip to content

Commit c489cbd

Browse files
committed
Add a corner case checking for ∆∆
1 parent 47a2ffe commit c489cbd

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

dabest/_classes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ def __init__(self, data, idx, x, y, paired, id_col, ci,
151151
if idx is None and x is not None and y is not None:
152152
# Add a length check for unique values in the first element in list x,
153153
# if the length is greater than 2, force delta2 to be False
154-
if len(data_in[x[0]].unique()) > 2:
154+
# Should be removed if delta2 for situations other than 2x2 is supported
155+
if len(data_in[x[0]].unique()) > 2 and x1_level is None:
155156
delta2 = False
156157
self.__delta2 = delta2
157158
# stop the loop if delta2 is False

nbs/API/class.ipynb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,8 @@
221221
" if idx is None and x is not None and y is not None:\n",
222222
" # Add a length check for unique values in the first element in list x, \n",
223223
" # if the length is greater than 2, force delta2 to be False\n",
224-
" if len(data_in[x[0]].unique()) > 2:\n",
224+
" # Should be removed if delta2 for situations other than 2x2 is supported\n",
225+
" if len(data_in[x[0]].unique()) > 2 and x1_level is None:\n",
225226
" delta2 = False\n",
226227
" self.__delta2 = delta2\n",
227228
" # stop the loop if delta2 is False\n",

0 commit comments

Comments
 (0)