提交 ecfbdfd4 authored 作者: Frederic's avatar Frederic

small opt. We override the data, so it don't need to be zeros.

上级 d96ff136
......@@ -674,7 +674,7 @@ def permutation_helper(random_state, n, shape):
shape = ()
out_shape = list(shape)
out_shape.append(n)
out = numpy.zeros(out_shape, int)
out = numpy.empty(out_shape, int)
for i in numpy.ndindex(*shape):
out[i] = random_state.permutation(n)
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论