!22253 Fix numpy.rollaxis in graph mode

Merge pull request !22253 from wangrao124/fix_rollaxis
This commit is contained in:
i-robot 2021-08-24 08:36:12 +00:00 committed by Gitee
commit 9394686885
1 changed files with 1 additions and 1 deletions

View File

@ -200,7 +200,7 @@ def rollaxis(x, axis, start=0):
axis = _check_axes_range(axis, ndim)
start = _check_start_normalize(start, ndim)
if 0 <= start - axis <= 1:
if start - axis >= 0 and start - axis <= 1:
return x
perm = F.make_range(0, ndim)
new_perm = None