From 76ad31501bd753a6a760f075dc04990c5fc90219 Mon Sep 17 00:00:00 2001 From: Nate Jensen Date: Thu, 1 May 2014 11:01:37 -0500 Subject: [PATCH] Issue #3101 safe cast numpy shape values to Number Change-Id: Ie81917cf19819e159195a50d6ad786d20c32136c Former-commit-id: 8df8db0d9b9cc0848bf73a09bcedb8cb7947a4bb --- .../uf/common/derivparam/python/MasterDerivScript.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/edexOsgi/com.raytheon.uf.common.derivparam.python/src/com/raytheon/uf/common/derivparam/python/MasterDerivScript.java b/edexOsgi/com.raytheon.uf.common.derivparam.python/src/com/raytheon/uf/common/derivparam/python/MasterDerivScript.java index c79002c7d5..b15aed389a 100644 --- a/edexOsgi/com.raytheon.uf.common.derivparam.python/src/com/raytheon/uf/common/derivparam/python/MasterDerivScript.java +++ b/edexOsgi/com.raytheon.uf.common.derivparam.python/src/com/raytheon/uf/common/derivparam/python/MasterDerivScript.java @@ -51,6 +51,7 @@ import com.raytheon.uf.common.python.PythonInterpreter; * Nov 21, 2009 3576 rjpeter Refactored to populate DerivParamDesc. * Oct 29, 2013 2476 njensen Renamed numeric methods to numpy * Apr 11, 2014 2947 bsteffen Allow returning NaN + * May 01, 2014 3101 njensen Safe cast result shape values to Number * * * @@ -370,8 +371,8 @@ public class MasterDerivScript extends PythonInterpreter { long[] dims = new long[nDims]; for (int i = 0; i < nDims; i++) { - dims[i] = ((Integer) jep.getValue("numpy.shape(" + RESULT + ")[" - + i + "]")).longValue(); + dims[i] = ((Number) jep.getValue("numpy.shape(" + RESULT + ")[" + i + + "]")).longValue(); } if (dims.length == 2) {