inv

inv(x: array, /) array

Returns the multiplicative inverse of a square matrix (or a stack of square matrices) x.

Parameters

x (array) – input array having shape (..., M, M) and whose innermost two dimensions form square matrices. Should have a floating-point data type.

Returns

out (array) – an array containing the multiplicative inverses. The returned array must have a floating-point data type determined by Type Promotion Rules and must have the same shape as x.