Skip to content

Commit

Permalink
remove center unsetting if expand=True (#7715)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmeier committed Jul 3, 2023
1 parent 71968bc commit 43030cb
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions torchvision/transforms/v2/functional/_geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -921,7 +921,6 @@ def rotate_image_pil(

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

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

return _affine_bounding_box_with_expand(
bounding_box,
Expand Down

0 comments on commit 43030cb

Please sign in to comment.