mindspore2022/docs/api/api_python/ops/mindspore.ops.Meshgrid.rst

25 lines
1.1 KiB
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.Meshgrid
========================
.. py:class:: mindspore.ops.Meshgrid(indexing="xy")
从给定的Tensor生成网格矩阵。
给定N个一维Tensor对每个Tensor做扩张操作返回N个N维的Tensor。
**参数:**
- **indexing** ('xy', 'ij', optional) - 'xy'或'ij'。以笛卡尔坐标'xy'或者矩阵'ij'索引作为输出。以长度为 `M``N` 的二维输入,取值为'xy'时输出的shape为 :math:`(N, M)` ,取值为'ij'时输出的shape为 :math:`(M, N)` 。以长度为 `M` , `N``P` 的三维输入,取值为'xy'时输出的shape为 :math:`(N, M, P)` ,取值为'ij'时输出的shape为 :math:`(M, N, P)` 。默认值:'xy'。
**输入:**
- **input** (Union[tuple]) - N个一维Tensor。输入的长度应大于1。数据类型为Number。
**输出:**
TensorN个N维tensor对象的元组。数据类型与输入相同。
**异常:**
- **TypeError** - `indexing` 不是str或 `input` 不是元组。
- **ValueError** - `indexing` 的取值既不是'xy'也不是'ij'。