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.Meshgrid.rst 1.1 kB

12345678910111213141516171819202122232425
  1. mindspore.ops.Meshgrid
  2. ========================
  3. .. py:class:: mindspore.ops.Meshgrid(indexing="xy")
  4. 从给定的Tensor生成网格矩阵。
  5. 给定N个一维Tensor,对每个Tensor做扩张操作,返回N个N维的Tensor。
  6. **参数:**
  7. - **indexing** ('xy', 'ij', optional) - 'xy'或'ij'。默认值:'xy'。以笛卡尔坐标'xy'或者矩阵'ij'索引作为输出。以长度为 `M` 和 `N` 的二维输入,取值为'xy'时,输出的shape为 `(N, M)` ,取值为'ij'时,输出的shape为 `(M, N)` 。以长度为 `M` , `N` 和 `P` 的三维输入,取值为'xy'时,输出的shape为 `(N, M, P)` ,取值为'ij'时,输出的shape为 `(M, N, P)` 。
  8. **输入:**
  9. - **input** (Union[tuple]) - N个一维Tensor。输入的长度应大于1。数据类型为Number。
  10. **输出:**
  11. Tensor,N个N维tensor对象的元组。数据类型与输入相同。
  12. **异常:**
  13. - **TypeError** - `indexing` 不是str或 `input` 不是元组。
  14. - **ValueError** - `indexing` 的取值既不是'xy'也不是'ij'。