提交 bb0a326c authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Fix GpuDiagonal for python 3.

上级 84ec2919
......@@ -1144,7 +1144,7 @@ class GpuDiagonal(Subtensor):
# This is also in consistence with the interface of numpy.diagonal.
if slice_axis < stride_axis:
stride_axis -= 1
new_dim_order = range(x[slicer].ndim)
new_dim_order = list(range(x[slicer].ndim))
new_dim_order = tuple(new_dim_order[:stride_axis] +
new_dim_order[stride_axis + 1:] +
[stride_axis, ])
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论