mindspore/docs/api/api_python/ops/mindspore.ops.func_range.rst

17 lines
805 B
ReStructuredText
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

mindspore.ops.range
====================
.. py:function:: mindspore.ops.range(start, limit, delta)
返回从 `start` 开始,步长为 `delta` ,且不超过 `limit` (不包括 `limit` )的序列。
三个输入的数据类型必须相同。函数返回的Tensor的数据类型与输入数据类型保持一致。
参数:
- **start** (Tensor) - 标量Tensor序列中的第一个数字。数据类型必须为int32或者float32。
- **limit** (Tensor) - 标量Tensor序列中的数值上线不包括其本身。数据类型必须为int32或者float32。
- **delta** (Tensor) - 标量Tensor表述序列中数值的步长。数据类型必须为int32或者float32。
返回:
一维Tensor数据类型与输入数据类型一致。