Skip to content

Commit 14a2baa

Browse files
authored
Fix warning message (#1366)
1 parent caf0602 commit 14a2baa

File tree

1 file changed

+4
-4
lines changed
  • src/torchio/transforms/preprocessing/spatial

1 file changed

+4
-4
lines changed

src/torchio/transforms/preprocessing/spatial/pad.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ def _check_truncation(self, image: Image, mode: Union[str, float]) -> None:
8787
if torch.is_floating_point(image.data):
8888
return
8989
message = (
90-
f'The constant value computed for padding mode "{mode}" might '
91-
' be truncated in the output, as the input image is not'
92-
'floating point. Consider converting the image to a floating'
93-
' point type before applying this transform.'
90+
f'The constant value computed for padding mode "{mode}" might be truncated '
91+
' in the output, as the data type of the input image is not float.'
92+
' Consider converting the image to a floating point type'
93+
' before applying this transform.'
9494
)
9595
warnings.warn(message, RuntimeWarning, stacklevel=2)
9696

0 commit comments

Comments
 (0)