diff --git a/mindspore/python/mindspore/ops/operations/math_ops.py b/mindspore/python/mindspore/ops/operations/math_ops.py index a6512b2f9ef..d224ef9e8f4 100644 --- a/mindspore/python/mindspore/ops/operations/math_ops.py +++ b/mindspore/python/mindspore/ops/operations/math_ops.py @@ -7929,5 +7929,5 @@ class Roll(Primitive): validator.check_equal_int(len(axis), 1, "shift size", self.name) validator.check_equal_int(axis[0], 0, "axis", self.name) elif isinstance(shift, int) and isinstance(axis, int): - validator.check_equal_int(axis, 0, "axis", self.name) + validator.check_is_int(axis, "axis", self.name) self.init_prim_io_names(inputs=['input_x'], outputs=['output'])