diff --git a/pyglance/glance/gui_view.py b/pyglance/glance/gui_view.py index 95d73724d99d697a9c38a993d5149284164e925b..a8e7c9cec679c6417d3f9d0746d3590e1fa4d9b3 100644 --- a/pyglance/glance/gui_view.py +++ b/pyglance/glance/gui_view.py @@ -8,6 +8,7 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved. """ import sys, os.path, logging +import numpy from PyQt4 import QtGui, QtCore @@ -839,6 +840,14 @@ class GlanceGUIView (QtGui.QWidget) : given variable data, pop a window to show it to the user """ + if len(variableDataObject.data.shape) == 0: + # This is a simple scalar value. Toss it into an array + # so the following code can cope + newData = variableDataObject.copy() + newData.data = numpy.array([variableDataObject.data.item()]) + variableDataObject = newData + + if len(variableDataObject.data.shape) > 0 and len(variableDataObject.data.shape) <= 2 : tempID = self.dataShowCounter