cupy.linalg.pinv¶
-
cupy.linalg.pinv(a, rcond=1e-15)[source]¶ Compute the Moore-Penrose pseudoinverse of a matrix.
It computes a pseudoinverse of a matrix
a, which is a generalization of the inverse matrix with Singular Value Decomposition (SVD). Note that it automatically removes small singular values for stability.- Parameters
a (cupy.ndarray) – The matrix with dimension
(M, N)rcond (float) – Cutoff parameter for small singular values. For stability it computes the largest singular value denoted by
rcond * s, and sets all singular values smaller thansto zero.
- Returns
The pseudoinverse of
awith dimension(N, M).- Return type
Warning
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()orcupyx.seterr().See also