Skip to content

Commit

Permalink
Merge pull request #336 from rsagroup/data-split-bug
Browse files Browse the repository at this point in the history
data split bug
  • Loading branch information
HeikoSchuett authored Aug 31, 2023
2 parents 01e767c + b79cc08 commit c1e48fb
Showing 1 changed file with 1 addition and 16 deletions.
17 changes: 1 addition & 16 deletions src/rsatoolbox/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def sort_by(self, by):
"""
desc = self.obs_descriptors[by]
order = np.argsort(desc)
order = np.argsort(desc, kind='stable')
self.measurements = self.measurements[order]
self.obs_descriptors = subset_descriptor(self.obs_descriptors, order)

Expand Down Expand Up @@ -685,21 +685,6 @@ def subset_time(self, by, t_from, t_to):
time_descriptors=time_descriptors)
return dataset

def sort_by(self, by):
""" sorts the dataset by a given observation descriptor
Args:
by(String): the descriptor by which the dataset shall be sorted
Returns:
---
"""
desc = self.obs_descriptors[by]
order = np.argsort(desc)
self.measurements = self.measurements[order]
self.obs_descriptors = subset_descriptor(self.obs_descriptors, order)

def convert_to_dataset(self, by):
""" converts to Dataset long format.
time dimension is absorbed into observation dimension
Expand Down

0 comments on commit c1e48fb

Please sign in to comment.