Skip to content

Commit 12f1286

Browse files
Merge pull request #210 from adkinsrs/master
Change to allow grouping order to be preserved
2 parents b8c6ae0 + 0464d2a commit 12f1286

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

diffxpy/testing/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ def parse_grouping(data, sample_description, grouping):
111111

112112
def split_x(data, grouping):
113113
grouping = np.asarray(grouping)
114-
groups = np.unique(grouping)
114+
groups = pd.Series(grouping).unique()
115115
x0 = data[np.where(grouping == groups[0])[0]]
116116
x1 = data[np.where(grouping == groups[1])[0]]
117117
return x0, x1

0 commit comments

Comments
 (0)