From bac8080b0c130b85cfe7d875cb73c993cd31fef8 Mon Sep 17 00:00:00 2001 From: dschoni Date: Tue, 21 May 2019 14:14:10 +0200 Subject: [PATCH] Typecast Levels to be float This circumvents cases in which "levels" is a boolean array and therefore the substraction fails due to deprecation. --- pyqtgraph/functions.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pyqtgraph/functions.py b/pyqtgraph/functions.py index fe3f9910..1fa10f5c 100644 --- a/pyqtgraph/functions.py +++ b/pyqtgraph/functions.py @@ -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') if not isinstance(levels, np.ndarray): levels = np.array(levels) + levels = levels.astype(np.float) if levels.ndim == 1: if levels.shape[0] != 2: raise Exception('levels argument must have length 2')