Skip to content
Snippets Groups Projects
Commit 0c15f78c authored by Eva Schiffer's avatar Eva Schiffer Committed by GitHub
Browse files

Merge pull request #9 from adesmet-ssec/display-0d-array

support GUI Display Data on 0d variables
parents 44a95c78 4b5889d1
No related branches found
No related tags found
No related merge requests found
...@@ -8,6 +8,7 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved. ...@@ -8,6 +8,7 @@ Copyright (c) 2011 University of Wisconsin SSEC. All rights reserved.
""" """
import sys, os.path, logging import sys, os.path, logging
import numpy
from PyQt4 import QtGui, QtCore from PyQt4 import QtGui, QtCore
...@@ -839,6 +840,14 @@ class GlanceGUIView (QtGui.QWidget) : ...@@ -839,6 +840,14 @@ class GlanceGUIView (QtGui.QWidget) :
given variable data, pop a window to show it to the user 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 : if len(variableDataObject.data.shape) > 0 and len(variableDataObject.data.shape) <= 2 :
tempID = self.dataShowCounter tempID = self.dataShowCounter
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment