forked from mindspore-Ecosystem/mindspore
!22253 Fix numpy.rollaxis in graph mode
Merge pull request !22253 from wangrao124/fix_rollaxis
This commit is contained in:
commit
9394686885
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue