Skip to content

Commit 0a13d57

Browse files
committed
Fix the problem where Cohen's h was not calculated correctly
for the case of nonbinary samples. The bug was fixed by using changing the return value.
1 parent 16529c8 commit 0a13d57

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

dabest/_stats_tools/effsize.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def cohens_h(control, test):
259259
try:
260260
pd.unique(control)==np.array([0,1]).all()==False and (pd.unique(test)==np.array([0,1])).all()==False
261261
except:
262-
pass
262+
return None
263263

264264
# Convert to numpy arrays for speed.
265265
# NaNs are automatically dropped.

0 commit comments

Comments
 (0)