(self, x)
return self.palette[int(x)]
Return an RGB triplet (as np.ndarray) corresponding to value x.
        x may also be nan.
Return an RGB triplet (as np.ndarray) corresponding to value x.
        x may also be nan.
Return an RGB triplet ( as np . ndarray ) corresponding to value x . x may also be nan .
def value_to_color(self, x):
        """
        Return an RGB triplet (as np.ndarray) corresponding to value x.
        x may also be nan.
        """
        if np.isnan(x):
            return self.nan_color
        return self.palette[int(x)]
def value_to_color ( self , x ) : if np . isnan ( x ) : return self . nan_color return self . palette [ int ( x ) ]