(self, img)
return img_255
Convert float data to valid RGB values in the range [0, 255]

        Arguments:
            img (ndarray): the image data

        Returns:
            img (ndarray): image array with valid RGB values
Convert float data to valid RGB values in the range [0, 255]
Convert float data to valid RGB values in the range [ 0 255 ]
def scale_to_rgb(self, img):
        """
        Convert float data to valid RGB values in the range [0, 255]

        Arguments:
            img (ndarray): the image data

        Returns:
            img (ndarray): image array with valid RGB values
        """
        img_min = np.min(img)
        img_rng = np.max(img) - img_min
        img_255 = img - img_min
        if img_rng > 0:
            img_255 /= img_rng
            img_255 *= 255.
        return img_255
def scale_to_rgb ( self , img ) : img_min = np . min ( img ) img_rng = np . max ( img ) - img_min img_255 = img - img_min if img_rng > 0 : img_255 /= img_rng img_255 *= 255. return img_255