Skip to content

Commit

Permalink
Merge branch 'main' into update-repo-urls
Browse files Browse the repository at this point in the history
  • Loading branch information
fepegar authored Jan 30, 2025
2 parents 6db797c + ca79007 commit 4a72280
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ updates:
- package-ecosystem: "github-actions"
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
interval: "monthly"
9 changes: 9 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -30,3 +30,12 @@ bump-dry part='patch':

push:
git push && git push --tags

types:
uv run tox -e types

lint:
uv run ruff check

format:
uv run ruff format --diff
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 4a72280

Please sign in to comment.