scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
spilu(A, drop_tol=None, fill_factor=None, drop_rule=None, permc_spec=None, diag_pivot_thresh=None, relax=None, panel_size=None, options=None)

The resulting object is an approximation to the inverse of A.

Notes

To improve the better approximation to the inverse, you may need to increase :None:None:`fill_factor` AND decrease :None:None:`drop_tol`.

This function uses the SuperLU library.

Parameters

A : (N, N) array_like

Sparse matrix to factorize

drop_tol : float, optional

Drop tolerance (0 <= tol <= 1) for an incomplete LU decomposition. (default: 1e-4)

fill_factor : float, optional

Specifies the fill ratio upper bound (>= 1.0) for ILU. (default: 10)

drop_rule : str, optional

Comma-separated string of drop rules to use. Available rules: basic , prows , column , area , secondary , dynamic , interp . (Default: basic,area )

See SuperLU documentation for details.

Remaining other options :

Same as for splu

Returns

invA_approx : scipy.sparse.linalg.SuperLU

Object, which has a solve method.

Compute an incomplete LU decomposition for a sparse, square matrix.

See Also

splu

complete LU decomposition

Examples

>>> from scipy.sparse import csc_matrix
... from scipy.sparse.linalg import spilu
... A = csc_matrix([[1., 0., 0.], [5., 0., 2.], [0., -1., 0.]], dtype=float)
... B = spilu(A)
... x = np.array([1., 2., 3.], dtype=float)
... B.solve(x) array([ 1. , -3. , -1.5])
>>> A.dot(B.solve(x))
array([ 1.,  2.,  3.])
>>> B.solve(A.dot(x))
array([ 1.,  2.,  3.])
See :

Back References

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

scipy.sparse.linalg._dsolve.linsolve.splu scipy.sparse.linalg._dsolve.linsolve.spilu

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/sparse/linalg/_dsolve/linsolve.py#346
type: <class 'function'>
Commit: