提交 a9ad9106 编写于 作者: L LielinJiang 提交者: qingqing01

Fix warning of slice op (#3004)

上级 af10e1ce
......@@ -38,7 +38,7 @@ def slice_with_pad(a, s, value=0):
pads.append([pl, pr])
slices.append([l, r])
slices = list(map(lambda x: slice(x[0], x[1], 1), slices))
a = a[slices]
a = a[tuple(slices)]
a = np.pad(a, pad_width=pads, mode='constant', constant_values=value)
return a
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册