Skip to content

Commit e6064f9

Browse files
committed
fix mypy
Signed-off-by: YunLiu <55491388+KumoLiu@users.noreply.github.com>
1 parent 617a019 commit e6064f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

monai/apps/deepgrow/transforms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ def __call__(self, data):
441441

442442
if np.all(np.less(current_size, self.spatial_size)):
443443
cropper = SpatialCrop(roi_center=center, roi_size=self.spatial_size)
444-
box_start = np.array([s.start for s in cropper.slices])
445-
box_end = np.array([s.stop for s in cropper.slices])
444+
box_start = [s.start for s in cropper.slices]
445+
box_end = [s.stop for s in cropper.slices]
446446
else:
447447
cropper = SpatialCrop(roi_start=box_start, roi_end=box_end)
448448

monai/networks/schedulers/ddpm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ def step(
238238
pred_prev_sample = pred_original_sample_coeff * pred_original_sample + current_sample_coeff * sample
239239

240240
# 6. Add noise
241-
variance = 0
241+
variance: torch.Tensor | int = 0
242242
if timestep > 0:
243243
noise = torch.randn(
244244
model_output.size(),

0 commit comments

Comments
 (0)