fixes default type for product of empty shape. (#1341)

This commit is contained in:
Melih Elibol
2017-12-18 17:41:44 -08:00
committed by Philipp Moritz
parent 47b1f02d3e
commit 24b93b1123
+1 -1
View File
@@ -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