diff --git a/trollimage/xrimage.py b/trollimage/xrimage.py index da0b28f8..be218c03 100644 --- a/trollimage/xrimage.py +++ b/trollimage/xrimage.py @@ -1097,7 +1097,7 @@ def _check_stretch_value(self, val, kind='min'): val = self.xrify_tuples(val) dtype = self.data.dtype - if isinstance(dtype, (np.uint8, np.int8, np.uint16, np.int16)): + if dtype in (np.uint8, np.int8, np.uint16, np.int16): dtype = np.dtype(np.float32) elif np.issubdtype(dtype, np.integer) or isinstance(dtype, int): dtype = np.dtype(np.float64)