mindspore.ops.inverse

View Source On Gitee
mindspore.ops.inverse(input)[source]

Compute the inverse of the input matrix.

Note

The input must be at least two dimensions, and the size of the last two dimensions must be the same size. The matrix must be invertible. Dtype of complex numbers is not supported.

Parameters

input (Tensor) – The input tensor.

Returns

Tensor

Supported Platforms:

GPU CPU

Examples

>>> import mindspore
>>> print(mindspore.ops.inverse(mindspore.tensor([[1., 2.], [3., 4.]])))
[[-2.   1. ]
 [ 1.5 -0.5]]