add nanfix

This commit is contained in:
Jan Kotanski 2019-12-19 21:35:07 +01:00 committed by Kenneth Lyons
parent db67a256a9
commit 61967bd7f7

View File

@ -1113,7 +1113,7 @@ def makeARGB(data, lut=None, levels=None, scale=None, useRGBA=False):
# awkward, but fastest numpy native nan evaluation
#
nanMask = None
if data.dtype.kind == 'f' and np.isnan(data.min()):
if data.ndim == 2 and data.dtype.kind == 'f' and np.isnan(data.min()):
nanMask = np.isnan(data)
# Apply levels if given
if levels is not None: