VariablesViewer: fixed an issue handling numpy arrays.

Fri, 19 Apr 2019 11:03:34 +0200

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Fri, 19 Apr 2019 11:03:34 +0200
changeset 6953
b06cb5bbc880
parent 6952
31602c3f09fd
child 6954
b5a772d457f0

VariablesViewer: fixed an issue handling numpy arrays.

eric6/Debugger/VariablesViewer.py file | annotate | diff | comparison | revisions
--- a/eric6/Debugger/VariablesViewer.py	Fri Apr 19 11:02:49 2019 +0200
+++ b/eric6/Debugger/VariablesViewer.py	Fri Apr 19 11:03:34 2019 +0200
@@ -733,7 +733,7 @@
                 if par.text(2) == "django.MultiValueDict":
                     nlist[0] = 'getlist({0})'.format(nlist[0])
                 elif par.text(2) == "numpy.ndarray":
-                    if nlist[0][0].isalpha():
+                    if nlist and nlist[0][0].isalpha():
                         if nlist[0] in ["min", "max", "mean"]:
                             nlist[0] = ".{0}()".format(nlist[0])
                         else:

eric ide

mercurial