def rescale(self, image: np.ndarray, scale: Union[float, int]) -> np.ndarray:
        """
        Rescale a numpy image by scale amount
        """
        self._ensure_format_supported(image)
        return image * scale

        Rescale a numpy image by scale amount
        
dpkd/transformers/src/transformers/image_utils.py