Skip to content

Commit 0c0ea5e

Browse files
committed
remove center unsetting if expand=True
1 parent 71968bc commit 0c0ea5e

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

torchvision/transforms/v2/functional/_geometry.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -921,7 +921,6 @@ def rotate_image_pil(
921921

922922
if center is not None and expand:
923923
warnings.warn("The provided center argument has no effect on the result if expand is True")
924-
center = None
925924

926925
return _FP.rotate(
927926
image, angle, interpolation=pil_modes_mapping[interpolation], expand=expand, fill=fill, center=center
@@ -938,7 +937,6 @@ def rotate_bounding_box(
938937
) -> Tuple[torch.Tensor, Tuple[int, int]]:
939938
if center is not None and expand:
940939
warnings.warn("The provided center argument has no effect on the result if expand is True")
941-
center = None
942940

943941
return _affine_bounding_box_with_expand(
944942
bounding_box,

0 commit comments

Comments
 (0)