mirror of
https://github.com/wassname/ray.git
synced 2026-07-03 01:09:13 +08:00
fixes default type for product of empty shape. (#1341)
This commit is contained in:
committed by
Philipp Moritz
parent
47b1f02d3e
commit
24b93b1123
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user