From 987390d7ad6fa147182c89d020f4fc6d49824ccf Mon Sep 17 00:00:00 2001 From: Jens Hedegaard Nielsen Date: Thu, 26 Oct 2017 14:19:19 +0200 Subject: [PATCH] setarr is a numpy array its not safe to cast that to a bool --- qcodes/plots/pyqtgraph.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qcodes/plots/pyqtgraph.py b/qcodes/plots/pyqtgraph.py index 7512a4ba0c6..9a106f95c62 100644 --- a/qcodes/plots/pyqtgraph.py +++ b/qcodes/plots/pyqtgraph.py @@ -549,7 +549,7 @@ def fixUnitScaling(self, startranges: Optional[Dict[str, Dict[str, Union[float,i setarr = getattr(self.traces[i]['config'][axis], 'ndarray', None) arrmin = None arrmax = None - if setarr and not np.all(np.isnan(setarr)): + if setarr is not None and not np.all(np.isnan(setarr)): arrmax = setarr.max() arrmin = setarr.min() elif startranges is not None: