mindspore/docs/api/api_python/numpy/mindspore.numpy.triu_indice...

17 lines
697 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.numpy.triu_indices
=================================
.. py:function:: mindspore.numpy.triu_indices(n, k=0, m=None)
返回shape为 ``(n, m)`` 数组的上三角的索引。
参数:
- **n** (int) - 指定返回索引适用的数组大小。
- **k** (int, 可选) - 对角线的偏移量。默认值: ``0``
- **m** (int, 可选) - 指定返回索引适用的数组的列维度,默认情况下 ``m`` 等于 ``n``
返回:
上三角形的索引。返回的Tuple包含两个Tensor每个Tensor分别对应其在一个维度上的索引。
异常:
- **TypeError** - 如果 ``n`` ``k`` ``m`` 不是数字。