Skip to content

Commit 20aa19b

Browse files
adkinsrsdavidsebfischer
authored andcommitted
Change to allow grouping order to be preserved
1 parent f2b1677 commit 20aa19b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

diffxpy/testing/utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ 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 = np.unique(grouping)
115+
groups = pd.Series(grouping).unique()
115116
x0 = data[np.where(grouping == groups[0])[0]]
116117
x1 = data[np.where(grouping == groups[1])[0]]
117118
return x0, x1

0 commit comments

Comments
 (0)