mindspore/docs/api/api_python/ops/mindspore.ops.func_meshgrid...

22 lines
1.0 KiB
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.meshgrid
======================
.. py:function:: mindspore.ops.meshgrid(*inputs, indexing='xy')
从一维输入生成多维坐标网格。
.. note::
- graph mode下的 `inputs` 为N个一维tensorN应大于1。
- pynative mode下的 `inputs` 为N个零维或一维tensorN应大于0。数据类型为Number。
- 对于长度为 `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)`
参数:
- **inputs** (Union[tuple[Tensor], list[Tensor]]) - 输入tensors。
关键字参数:
- **indexing** (str, 可选) - 输出的网格矩阵的size。可选 ``'xy'````'ij'`` 。默认 ``'xy'``
返回:
由N个N维tensor组成的元组。