Merge pull request #876 from Dschoni/Fix-deprecated-boolean-substract

Typecast Levels to be float
This commit is contained in:
Ogi Moore 2019-05-23 22:26:21 -07:00 committed by GitHub
commit 95d62cec6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1057,6 +1057,7 @@ def makeARGB(data, lut=None, levels=None, scale=None, useRGBA=False):
raise Exception('levels argument is required for float input types') raise Exception('levels argument is required for float input types')
if not isinstance(levels, np.ndarray): if not isinstance(levels, np.ndarray):
levels = np.array(levels) levels = np.array(levels)
levels = levels.astype(np.float)
if levels.ndim == 1: if levels.ndim == 1:
if levels.shape[0] != 2: if levels.shape[0] != 2:
raise Exception('levels argument must have length 2') raise Exception('levels argument must have length 2')