src/transformers/models/glpn/image_processing_glpn.py/GLPNImageProcessor/rescale
class GLPNImageProcessor:    def rescale(
        self, image: np.ndarray, scale: float, data_format: Optional[ChannelDimension] = None, **kwargs
    ) -> np.ndarray:
        """
        Rescale the image by the given scaling factor `scale`.

        Args:
            image (`np.ndarray`):
                The image to rescale.
            scale (`float`):
                The scaling factor to rescale pixel values by.
            data_format (`ChannelDimension` or `str`, *optional*):
                The channel dimension format for the output image. If `None`, the channel dimension format of the input
                image is used. Can be one of:
                - `ChannelDimension.FIRST`: image in (num_channels, height, width) format.
                - `ChannelDimension.LAST`: image in (height, width, num_channels) format.

        Returns:
            `np.ndarray`: The rescaled image.
        """
        return rescale(image=image, scale=scale, data_format=data_format, **kwargs)