Skip to content

Commit

Permalink
Fix dtype check
Browse files Browse the repository at this point in the history
  • Loading branch information
pnuu committed Nov 24, 2023
1 parent d35a5ac commit 034d659
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion trollimage/xrimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 034d659

Please sign in to comment.