"git@developer.sourcefind.cn:chenpangpang/transformers.git" did not exist on "cdddfbffa1206958c0fabf60a87561b5704727a8"
Unverified Commit 9e87618f authored by Daniil's avatar Daniil Committed by GitHub
Browse files

Fix docstring and type hint for resize (#27104)

fix docstring and type hint for resize
parent ef23b68e
...@@ -274,7 +274,7 @@ def get_resize_output_image_size( ...@@ -274,7 +274,7 @@ def get_resize_output_image_size(
def resize( def resize(
image, image: np.ndarray,
size: Tuple[int, int], size: Tuple[int, int],
resample: "PILImageResampling" = None, resample: "PILImageResampling" = None,
reducing_gap: Optional[int] = None, reducing_gap: Optional[int] = None,
...@@ -286,7 +286,7 @@ def resize( ...@@ -286,7 +286,7 @@ def resize(
Resizes `image` to `(height, width)` specified by `size` using the PIL library. Resizes `image` to `(height, width)` specified by `size` using the PIL library.
Args: Args:
image (`PIL.Image.Image` or `np.ndarray` or `torch.Tensor`): image (`np.ndarray`):
The image to resize. The image to resize.
size (`Tuple[int, int]`): size (`Tuple[int, int]`):
The size to use for resizing the image. The size to use for resizing the image.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment