Merge pull request #876 from Dschoni/Fix-deprecated-boolean-substract
Typecast Levels to be float
This commit is contained in:
commit
95d62cec6a
@ -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')
|
||||||
|
Loading…
Reference in New Issue
Block a user