We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3656b99 commit 3c58135Copy full SHA for 3c58135
monai/transforms/intensity/array.py
@@ -907,7 +907,8 @@ def __call__(self, img: NdarrayOrTensor) -> NdarrayOrTensor:
907
if self.divisor is not None and len(self.divisor) != len(img):
908
raise ValueError(f"img has {len(img)} channels, but divisor has {len(self.divisor)} components.")
909
910
- img, *_ = convert_data_type(img, dtype=torch.float32)
+ if not img.dtype.is_floating_point:
911
+ img, *_ = convert_data_type(img, dtype=torch.float32)
912
913
for i, d in enumerate(img):
914
img[i] = self._normalize( # type: ignore
0 commit comments