Skip to content

Commit

Permalink
Fixed mypy type error
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronkujawa committed Jul 31, 2023
1 parent 6227edf commit 5500220
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions monai/transforms/spatial/array.py
Original file line number Diff line number Diff line change
Expand Up @@ -3498,7 +3498,7 @@ def __init__(
self.zoom_range = zoom_range
self.align_corners = align_corners
self.device = device
self.zoom_factor = 1
self.zoom_factor = 1.0

def randomize(self, data: Any | None = None) -> None:
super().randomize(None)
Expand All @@ -3516,8 +3516,8 @@ def __call__(self, img: torch.Tensor, randomize: bool = True) -> torch.Tensor:
self.randomize()

if self._do_transform:
input_shape = np.array(img.shape[1:])
target_shape = np.round(input_shape * self.zoom_factor).astype(np.int_)
input_shape = img.shape[1:]
target_shape = np.round(np.array(input_shape) * self.zoom_factor).astype(np.int_)

resize_tfm_downsample = Resize(
spatial_size=target_shape, size_mode="all", mode=self.downsample_mode, anti_aliasing=False
Expand Down

0 comments on commit 5500220

Please sign in to comment.