Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/torchio/transforms/preprocessing/spatial/pad.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ def _check_truncation(self, image: Image, mode: Union[str, float]) -> None:
if torch.is_floating_point(image.data):
return
message = (
f'The constant value computed for padding mode "{mode}" might '
' be truncated in the output, as the input image is not'
'floating point. Consider converting the image to a floating'
' point type before applying this transform.'
f'The constant value computed for padding mode "{mode}" might be truncated '
' in the output, as the data type of the input image is not float.'
' Consider converting the image to a floating point type'
' before applying this transform.'
)
warnings.warn(message, RuntimeWarning, stacklevel=2)

Expand Down
Loading