Skip to content

Commit ee9f3d6

Browse files
committed
Updated warning message
1 parent 2daefa6 commit ee9f3d6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

torchvision/prototype/transforms/functional/_geometry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ def rotate_image_tensor(
324324
center_f = [0.0, 0.0]
325325
if center is not None:
326326
if expand:
327-
warnings.warn("The provided center argument is ignored if expand is True")
327+
warnings.warn("The provided center argument has no effect on the result if expand is True")
328328
else:
329329
_, height, width = get_dimensions_image_tensor(img)
330330
# Center values should be in pixel coordinates but translated such that (0, 0) corresponds to image center.
@@ -345,7 +345,7 @@ def rotate_image_pil(
345345
center: Optional[List[float]] = None,
346346
) -> PIL.Image.Image:
347347
if center is not None and expand:
348-
warnings.warn("The provided center argument is ignored if expand is True")
348+
warnings.warn("The provided center argument has no effect on the result if expand is True")
349349
center = None
350350

351351
return _FP.rotate(
@@ -362,7 +362,7 @@ def rotate_bounding_box(
362362
center: Optional[List[float]] = None,
363363
) -> torch.Tensor:
364364
if center is not None and expand:
365-
warnings.warn("The provided center argument is ignored if expand is True")
365+
warnings.warn("The provided center argument has no effect on the result if expand is True")
366366
center = None
367367

368368
original_shape = bounding_box.shape

0 commit comments

Comments
 (0)