forked from mindspore-Ecosystem/mindspore
fix numpy.rollaxis in graph mode
This commit is contained in:
parent
4661b47b52
commit
7331a5712d
|
@ -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