Omaha #4259 Fix error in SmartScript.getGrids that caused scalar grids to fail.

Change-Id: Ief6e27abe1824c326550837e2bc0a8ab2e276a98

Former-commit-id: 686ab4bd37aa6cc656fdb1e8622a87a84872529a
This commit is contained in:
Ron Anderson 2015-07-08 12:42:54 -05:00
parent 4626fd62a9
commit 5eac3a423a

View file

@ -504,14 +504,14 @@ class SmartScript(BaseTool.BaseTool):
else:
result = result[0];
slice = result.getGridSlice()
result = slice.getNDArray()
if type(result) is ndarray and result.dtype == numpy.int8:
retVal = slice.getNDArray()
if type(retVal) is ndarray and retVal.dtype == numpy.int8:
# discrete or weather
keys = JUtil.javaObjToPyVal(slice.getKeyList())
retVal = (result, keys)
elif type(result) is not numpy.ndarray and len(result) == 2:
retVal = (retVal, keys)
elif type(retVal) is not numpy.ndarray and len(retVal) == 2:
# vector
retVal = tuple(result)
retVal = tuple(retVal)
if retVal is None or retVal == []:
if noDataError == 1: