提交 22544612 authored 作者: David Warde-Farley's avatar David Warde-Farley 提交者: Arnaud Bergeron

Weird difference indexing by list(range()) instead of range().

上级 d388108f
......@@ -151,7 +151,7 @@ def sparse_random_inputs(format, shape, n=1, out_dtype=None, p=0.5, gap=None,
if unsorted_indices:
for idx in range(n):
d = data[idx]
d = d[range(d.shape[0])]
d = d[list(range(d.shape[0]))]
assert not d.has_sorted_indices
data[idx] = d
if explicit_zero:
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论