eric6/DebugClients/Python/DebugVariables.py

changeset 6952
31602c3f09fd
parent 6942
2602857055c5
child 6969
fd7af2312383
--- a/eric6/DebugClients/Python/DebugVariables.py	Mon Apr 15 18:57:14 2019 +0200
+++ b/eric6/DebugClients/Python/DebugVariables.py	Fri Apr 19 11:02:49 2019 +0200
@@ -391,9 +391,14 @@
                        ' debugging'
         else:
             if self.__isNumeric(var):
-                d['min'] = var.min()
-                d['max'] = var.max()
-                d['mean'] = var.mean()
+                if var.size == 0:
+                    d['min'] = 'empty array'
+                    d['max'] = 'empty array'
+                    d['mean'] = 'empty array'
+                else:
+                    d['min'] = var.min()
+                    d['max'] = var.max()
+                    d['mean'] = var.mean()
             else:
                 d['min'] = 'not a numeric object'
                 d['max'] = 'not a numeric object'

eric ide

mercurial