From 43b452c4b4bbe5a4310afd1d2c6f085ae41db4f1 Mon Sep 17 00:00:00 2001 From: TilmannR Date: Sat, 30 Sep 2023 07:59:30 +0200 Subject: [PATCH] Fix markup in functional.py Due to a missing colon in the role markup ":meth:" (short for "method"), the documentation at https://pytorch.org/vision/master/generated/torchvision.transforms.functional.rgb_to_grayscale.html contained the sentence "For inputs in other color spaces, please, consider using meth:", which happens to be really terrible advice. --- torchvision/transforms/functional.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchvision/transforms/functional.py b/torchvision/transforms/functional.py index bdf4ccc5912..d176e00a8da 100644 --- a/torchvision/transforms/functional.py +++ b/torchvision/transforms/functional.py @@ -1270,7 +1270,7 @@ def rgb_to_grayscale(img: Tensor, num_output_channels: int = 1) -> Tensor: Note: Please, note that this method supports only RGB images as input. For inputs in other color spaces, - please, consider using meth:`~torchvision.transforms.functional.to_grayscale` with PIL Image. + please, consider using :meth:`~torchvision.transforms.functional.to_grayscale` with PIL Image. Args: img (PIL Image or Tensor): RGB Image to be converted to grayscale.