Skip to content

Commit

Permalink
Fix mypy error
Browse files Browse the repository at this point in the history
  • Loading branch information
fepegar committed Jan 30, 2025
1 parent cd66d9b commit 016f330
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/torchio/data/inference/aggregator.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def _initialize_avgmask_tensor(self, batch: torch.Tensor) -> None:
)

@staticmethod
def _get_hann_window(patch_size):
def _get_hann_window(patch_size) -> torch.Tensor:
hann_window_3d = torch.as_tensor([1])
# create a n-dim hann window
for spatial_dim, size in enumerate(patch_size):
Expand Down Expand Up @@ -211,6 +211,7 @@ def add_batch(
j_ini:j_fin,
k_ini:k_fin,
] += patch
assert self._hann_window is not None
self._avgmask_tensor[
:,
i_ini:i_fin,
Expand Down

0 comments on commit 016f330

Please sign in to comment.