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:
parent
4626fd62a9
commit
5eac3a423a
1 changed files with 5 additions and 5 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Reference in a new issue