Skip to content

Commit

Permalink
Add recommendations from code review
Browse files Browse the repository at this point in the history
  • Loading branch information
maxrjones committed Nov 18, 2022
1 parent 0a5d0cc commit 022ebf7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions xbatcher/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def _iterate_through_dataset(
dim_slices.append(_slices(dimsize, size, olap))

for slices in itertools.product(*dim_slices):
selector = {key: slice for key, slice in zip(dims, slices)}
selector = dict(zip(dims, slices))
yield selector


Expand Down Expand Up @@ -188,7 +188,7 @@ def _gen_batches(self) -> dict:
else:
batches += list(input_generator)

return dict(zip(range(len(batches)), batches))
return dict(enumerate(batches))

def _iterate_batch_dims(self) -> Any:
return _iterate_through_dataset(self.ds, self.batch_dims)
Expand Down

0 comments on commit 022ebf7

Please sign in to comment.