Computes the inverse of a matrix.

This function computes matrix a_inv from n-dimensional regular matrix a such that dot(a, a_inv) == eye(n).

Parameters:a (cupy.ndarray) – The regular matrix
Returns:The inverse of a matrix.
Return type:cupy.ndarray


This function calls one or more cuSOLVER routine(s) which may yield invalid results if input conditions are not met. To detect these invalid results, you can set the linalg configuration to a value that is not ignore in cupyx.errstate() or cupyx.seterr().