From dd0b4efcc4dd43f45fbf9c3d9980b98d614aee3c Mon Sep 17 00:00:00 2001 From: Xin Qiu Date: Tue, 23 Mar 2021 16:18:55 +0800 Subject: [PATCH] fix callBigDLFunc return a Int while the true return value from java is a byte array. (#3111) --- python/dllib/src/bigdl/utils/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/dllib/src/bigdl/utils/common.py b/python/dllib/src/bigdl/utils/common.py index a58d61629dd..f15d7a554af 100644 --- a/python/dllib/src/bigdl/utils/common.py +++ b/python/dllib/src/bigdl/utils/common.py @@ -634,8 +634,8 @@ def _java2py(gateway, r, encoding="bytes"): except Py4JJavaError: pass # not pickable - if isinstance(r, (bytearray, bytes)): - r = PickleSerializer().loads(bytes(r), encoding=encoding) + if isinstance(r, (bytearray, bytes)): + r = PickleSerializer().loads(bytes(r), encoding=encoding) return r