Skip to content

Commit 0bdc036

Browse files
author
Rima Hajou
committed
fix bug in groupedhole generator
1 parent 6b58fdd commit 0bdc036

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qolmat/benchmark/missing_patterns.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ def fit(self, X: pd.DataFrame) -> GroupedHoleGenerator:
644644

645645
super().fit(X)
646646

647-
if self.n_splits > len(np.unique(self.groups_num)):
647+
if self.n_splits > self.ngroups.nunique():
648648
raise ValueError("n_samples has to be smaller than the number of groups.")
649649

650650
return self

0 commit comments

Comments
 (0)