Skip to content

Commit

Permalink
setarr is a numpy array its not safe to cast that to a bool (#818)
Browse files Browse the repository at this point in the history
  • Loading branch information
jenshnielsen authored and WilliamHPNielsen committed Oct 26, 2017
1 parent 9d01779 commit 3d7baef
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion qcodes/plots/pyqtgraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3d7baef

Please sign in to comment.