提交 bb2daf97 authored 作者: Rodrigo Luger's avatar Rodrigo Luger 提交者: Thomas Wiecki

Eliminate FutureWarning from numpy (#6703)

Casting `diagonal_slice` to tuple eliminates a FutureWarning from numpy that could cause an error down the line.
上级 9feed786
......@@ -6608,7 +6608,7 @@ class AllocDiag(Op):
idxs + np.maximum(0, offset)])
# Fill in final 2 axes with x
result[diagonal_slice] = x
result[tuple(diagonal_slice)] = x
if len(x.shape) > 1:
# Re-order axes so they correspond to diagonals at axis1, axis2
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论