Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
b8raoult committed Sep 20, 2023
1 parent fb27211 commit 2283ad2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ecml_tools/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ def __getitem__(self, n):

class Subset(Base):
def __init__(self, dataset, indices):
while isinstance(dataset, Subset):
indices = [dataset.indices[i] for i in indices]
dataset = dataset.dataset

self.dataset = dataset
self.indices = list(indices)

Expand Down

0 comments on commit 2283ad2

Please sign in to comment.