Skip to content

Commit

Permalink
Changes in index
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexeyKozhevin committed Jan 18, 2024
1 parent 0d1ccac commit 6be75f6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions batchflow/batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -457,13 +457,13 @@ def __getitem__(self, item):
return self.data[item] if self.data is not None else None

def __iter__(self):
for item in self.indices:
yield self[item]
for ix, _ in enumerate(self.indices):
yield self[ix]

@property
def items(self):
""": list - batch items """
return [[self[ix]] for ix in self.indices]
return [[self[ix]] for ix, _ in enumerate(self.indices)]

def run_once(self, *args, **kwargs):
""" Init function for no parallelism
Expand Down

0 comments on commit 6be75f6

Please sign in to comment.