diff --git a/mindspore/nn/layer/math.py b/mindspore/nn/layer/math.py index c8d668ac0e..47075441a6 100644 --- a/mindspore/nn/layer/math.py +++ b/mindspore/nn/layer/math.py @@ -99,7 +99,7 @@ class ReduceLogSumExp(Cell): class Range(Cell): r""" - Creates a sequence of numbers. + Creates a sequence of numbers in range [start, limit) with step size delta. Args: start (Union[int, float]): If `limit` is `None`, the value acts as limit in the range and first entry diff --git a/mindspore/ops/functional.py b/mindspore/ops/functional.py index 00aaf64e49..d02369b2a6 100644 --- a/mindspore/ops/functional.py +++ b/mindspore/ops/functional.py @@ -23,11 +23,6 @@ from . import operations as P from .operations import _grad_ops -def arange(start, limit=None, delta=1): - from mindspore.nn import Range - return Range(start, limit, delta)() - - typeof = Primitive('typeof') hastype = Primitive('hastype') cast = P.Cast() diff --git a/tests/ut/python/ops/test_math_ops.py b/tests/ut/python/ops/test_math_ops.py index 934b9f139c..ac4b1ac434 100755 --- a/tests/ut/python/ops/test_math_ops.py +++ b/tests/ut/python/ops/test_math_ops.py @@ -24,7 +24,6 @@ from mindspore import Tensor from mindspore.common import dtype as mstype from mindspore.ops import composite as C from mindspore.ops import operations as P -from mindspore.ops import functional as F from mindspore.ops import prim_attr_register, PrimitiveWithInfer from ..ut_filter import non_graph_engine from ....mindspore_test_framework.mindspore_test import mindspore_test @@ -140,13 +139,6 @@ def test_eye(): assert np.all(eye_output.asnumpy() == expect) -def test_arange(): - """ test_arange """ - F.arange(10) - F.arange(1, 5) - F.arange(1, 10, 2) - - class VirtualLossGrad(PrimitiveWithInfer): """ VirtualLossGrad definition """