scipy 1.8.0 Pypi GitHub Homepage
Other Docs
ParametersRaisesReturnsBackRef
pinv2(a, cond=None, rcond=None, return_rank=False, check_finite=True)

scipy.linalg.pinv2 is deprecated since SciPy 1.7.0, use scipy.linalg.pinv instead for better tolerance control.

Calculate a generalized inverse of a matrix using its singular-value decomposition and including all 'large' singular values.

Parameters

a : (M, N) array_like

Matrix to be pseudo-inverted.

cond, rcond : float or None

Cutoff for 'small' singular values; singular values smaller than this value are considered as zero. If both are omitted, the default value max(M,N)*largest_singular_value*eps is used where eps is the machine precision value of the datatype of a .

versionchanged

Previously the default cutoff value was just eps*f where f was 1e3 for single precision and 1e6 for double precision.

return_rank : bool, optional

If True, return the effective rank of the matrix.

check_finite : bool, optional

Whether to check that the input matrix contains only finite numbers. Disabling may give a performance gain, but may result in problems (crashes, non-termination) if the inputs do contain infinities or NaNs.

Raises

LinAlgError

If SVD computation does not converge.

Returns

B : (N, M) ndarray

The pseudo-inverse of matrix a.

rank : int

The effective rank of the matrix. Returned if :None:None:`return_rank` is True.

Compute the (Moore-Penrose) pseudo-inverse of a matrix.

Examples

See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.linalg._basic.pinv2

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/linalg/_basic.py#1349
type: <class 'function'>
Commit: