You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

mindspore.ops.func_arange.rst 946 B

4 years ago
4 years ago
12345678910111213141516171819202122
  1. mindspore.ops.arange
  2. ===============================
  3. .. py:function:: mindspore.ops.arange(start=0, stop=None, step=1, rtype=None)
  4. 根据给定的范围返回指定均匀间隔的数据。
  5. **参数:**
  6. - **start** (Union[int, float]) - 指定范围的起始值,范围包含该值。类型为int或float。
  7. - **stop** (Union[int, float]) - 指定范围的结束值,范围不包含该值。类型为int或float。
  8. - **step** (Union[int, float]) - 指定取值的间隔。类型为int或float。
  9. - **rtype** (Union[mindspore.dtype, str]) - 指定返回数据的类型,如果不指定,则会根据 `start` 、 `stop` 、 `step` 的值推断类型。
  10. **返回:**
  11. Tensor,值是均匀间隔的数据,类型为给定或推断的结果。
  12. **异常:**
  13. - **TypeError** - `start` 、 `stop` 、 `step` 的类型不是int或float。
  14. - **ValueError** - `start` 的值大于等于 `stop` 。