torch.linalg.inv_ex
torch.linalg.inv_ex(A, *, check_errors=False, out=None)
Computes the inverse of a square matrix if it is invertible.
Returns a namedtuple "(inverse, info)". "inverse" contains the
   result of inverting "A" and "info" stores the LAPACK error codes.
If "A" is not an invertible matrix, or if it's a batch of matrices
   and one or more of them is not an invertible matrix, then "info"
   stores a positive integer for the corresponding matrix. The
   positive integer indicates the diagonal element of the LU
   decomposition of the input matrix that is exactly zero. "info"
   filled with zeros indicates that the inversion was successful. If
   "check_errors=True" and "info" contains positive integers, then a
   RuntimeError is thrown.
Supports input of float, double, cfloat and cdouble dtypes. Also
   supports batches of matrices, and if "A" is a batch of matrices
   then the output has the same batch dimensions.
Note: