Skip to content

Commit 7800890

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 02106a1 commit 7800890

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

monai/inferers/utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,12 @@ def sliding_window_inference(
172172
Note:
173173
- Inputs must be channel-first and have a batch dim (NCHW / NCDHW).
174174
- If your data is NHWC/NDHWC, please apply `EnsureChannelFirst` / `EnsureChannelFirstd` upstream.
175-
175+
176176
"""
177177
num_spatial_dims = len(inputs.shape) - 2
178-
178+
179179
# Only perform strict shape validation if roi_size is a sequence (explicit dimensions).
180-
# If roi_size is an integer, it is broadcast to all dimensions, so we cannot
180+
# If roi_size is an integer, it is broadcast to all dimensions, so we cannot
181181
# infer the expected dimensionality to enforce a strict check here.
182182
if not isinstance(roi_size, int):
183183
roi_dims = len(roi_size)

tests/inferers/test_sliding_window_inference.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def test_strict_shape_validation(self):
377377
device = "cpu"
378378
roi_size = (16, 16, 16)
379379
sw_batch_size = 4
380-
380+
381381
def predictor(data):
382382
return data
383383

0 commit comments

Comments
 (0)