From 24b93b11231fe627c4b4527535ae0c83a99485f8 Mon Sep 17 00:00:00 2001 From: Melih Elibol Date: Mon, 18 Dec 2017 17:41:44 -0800 Subject: [PATCH] fixes default type for product of empty shape. (#1341) --- python/ray/experimental/tfutils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/ray/experimental/tfutils.py b/python/ray/experimental/tfutils.py index 5133a49b9..c6aa4ba9a 100644 --- a/python/ray/experimental/tfutils.py +++ b/python/ray/experimental/tfutils.py @@ -9,7 +9,7 @@ def unflatten(vector, shapes): i = 0 arrays = [] for shape in shapes: - size = np.prod(shape) + size = np.prod(shape, dtype=np.int) array = vector[i:(i + size)].reshape(shape) arrays.append(array) i += size