Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Nov 23, 2023
1 parent 7b86a1d commit 9405a82
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/torchio/data/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,14 @@ def num_patches(self) -> int:
@property
def iterations_per_epoch(self) -> int:
if self.subject_sampler is not None:
subjects_dataset = [self.subjects_dataset.dry_iter()[i] for i in self.subject_sampler]
subjects_dataset = [
self.subjects_dataset.dry_iter()[i] for i in self.subject_sampler
]
else:
subjects_dataset = self.subjects_dataset.dry_iter()

total_num_patches = sum(
self._get_subject_num_samples(subject)
for subject in subjects_dataset
self._get_subject_num_samples(subject) for subject in subjects_dataset
)
return total_num_patches

Expand Down

0 comments on commit 9405a82

Please sign in to comment.