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

22 lines
836 B
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.pinv
=========================
.. py:function:: mindspore.ops.pinv(x, *, atol=None, rtol=None, hermitian=False)
计算矩阵的Moore-Penrose伪逆。
参数:
- **x** (Tensor) - 要计算的矩阵。矩阵必须至少有两个维度。支持数据类型为float32或float64。
关键字参数:
- **atol** (float, Tensor) - 绝对公差值。默认值None。
- **rtol** (float, Tensor) - 相对公差值。默认值None。
- **hermitian** (bool) - 为True时假设x为实对称矩阵。默认值False。
输出:
Tensor: 类型与输入相同。若输入x(m, n),则输出(n, m)
异常:
- **TypeError** - `hermitian` 不是bool。
- **TypeError** - `x` 不是Tensor。
- **ValueError** - `x` 的维度小于2。