mindspore.ops.Range

class mindspore.ops.Range(maxlen=1000000)[source]

Creates a sequence of numbers that begins at start and extends by increments of delta up to but not including limit. Length of the created sequence can not exceed maxlen. The default value of maxlen is 1000000.

Refer to mindspore.ops.range() for more details.

Supported Platforms:

GPU CPU

Examples

>>> start = Tensor(0, mstype.int32)
>>> limit = Tensor(10, mstype.int32)
>>> delta = Tensor(4, mstype.int32)
>>> output = ops.Range()(start, limit, delta)
>>> print(output)
[0 4 8]