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

16 lines
558 B
ReStructuredText
Raw Permalink 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.rank
===================
.. py:function:: mindspore.ops.rank(input_x)
返回输入Tensor的秩是一个零维的数据类型为int32。Tensor的秩是确定Tensor中每个元素所需的索引数。
参数:
- **input_x** (Tensor) - Tensor的shape为 :math:`(x_1,x_2,...,x_R)` 。数据类型为数值型。
返回:
Tensor表示输入的秩是一个零维的数据类型为int32:math:`R` 。数据类型为int。
异常:
- **TypeError** - 如果 `input_x` 不是Tensor。