Coverage for /pythoncovmergedfiles/medio/medio/usr/local/lib/python3.9/dist-packages/scipy/sparse/linalg/__init__.py: 100%

14 statements  

« prev     ^ index     » next       coverage.py v7.3.1, created at 2023-09-23 06:43 +0000

1""" 

2Sparse linear algebra (:mod:`scipy.sparse.linalg`) 

3================================================== 

4 

5.. currentmodule:: scipy.sparse.linalg 

6 

7Abstract linear operators 

8------------------------- 

9 

10.. autosummary:: 

11 :toctree: generated/ 

12 

13 LinearOperator -- abstract representation of a linear operator 

14 aslinearoperator -- convert an object to an abstract linear operator 

15 

16Matrix Operations 

17----------------- 

18 

19.. autosummary:: 

20 :toctree: generated/ 

21 

22 inv -- compute the sparse matrix inverse 

23 expm -- compute the sparse matrix exponential 

24 expm_multiply -- compute the product of a matrix exponential and a matrix 

25 matrix_power -- compute the matrix power by raising a matrix to an exponent 

26 

27Matrix norms 

28------------ 

29 

30.. autosummary:: 

31 :toctree: generated/ 

32 

33 norm -- Norm of a sparse matrix 

34 onenormest -- Estimate the 1-norm of a sparse matrix 

35 

36Solving linear problems 

37----------------------- 

38 

39Direct methods for linear equation systems: 

40 

41.. autosummary:: 

42 :toctree: generated/ 

43 

44 spsolve -- Solve the sparse linear system Ax=b 

45 spsolve_triangular -- Solve sparse linear system Ax=b for a triangular A. 

46 factorized -- Pre-factorize matrix to a function solving a linear system 

47 MatrixRankWarning -- Warning on exactly singular matrices 

48 use_solver -- Select direct solver to use 

49 

50Iterative methods for linear equation systems: 

51 

52.. autosummary:: 

53 :toctree: generated/ 

54 

55 bicg -- Use BIConjugate Gradient iteration to solve Ax = b 

56 bicgstab -- Use BIConjugate Gradient STABilized iteration to solve Ax = b 

57 cg -- Use Conjugate Gradient iteration to solve Ax = b 

58 cgs -- Use Conjugate Gradient Squared iteration to solve Ax = b 

59 gmres -- Use Generalized Minimal RESidual iteration to solve Ax = b 

60 lgmres -- Solve a matrix equation using the LGMRES algorithm 

61 minres -- Use MINimum RESidual iteration to solve Ax = b 

62 qmr -- Use Quasi-Minimal Residual iteration to solve Ax = b 

63 gcrotmk -- Solve a matrix equation using the GCROT(m,k) algorithm 

64 tfqmr -- Use Transpose-Free Quasi-Minimal Residual iteration to solve Ax = b 

65 

66Iterative methods for least-squares problems: 

67 

68.. autosummary:: 

69 :toctree: generated/ 

70 

71 lsqr -- Find the least-squares solution to a sparse linear equation system 

72 lsmr -- Find the least-squares solution to a sparse linear equation system 

73 

74Matrix factorizations 

75--------------------- 

76 

77Eigenvalue problems: 

78 

79.. autosummary:: 

80 :toctree: generated/ 

81 

82 eigs -- Find k eigenvalues and eigenvectors of the square matrix A 

83 eigsh -- Find k eigenvalues and eigenvectors of a symmetric matrix 

84 lobpcg -- Solve symmetric partial eigenproblems with optional preconditioning 

85 

86Singular values problems: 

87 

88.. autosummary:: 

89 :toctree: generated/ 

90 

91 svds -- Compute k singular values/vectors for a sparse matrix 

92 

93The `svds` function supports the following solvers: 

94 

95.. toctree:: 

96 

97 sparse.linalg.svds-arpack 

98 sparse.linalg.svds-lobpcg 

99 sparse.linalg.svds-propack 

100 

101Complete or incomplete LU factorizations 

102 

103.. autosummary:: 

104 :toctree: generated/ 

105 

106 splu -- Compute a LU decomposition for a sparse matrix 

107 spilu -- Compute an incomplete LU decomposition for a sparse matrix 

108 SuperLU -- Object representing an LU factorization 

109 

110Sparse arrays with structure 

111---------------------------- 

112 

113.. autosummary:: 

114 :toctree: generated/ 

115 

116 LaplacianNd -- Laplacian on a uniform rectangular grid in ``N`` dimensions 

117 

118Exceptions 

119---------- 

120 

121.. autosummary:: 

122 :toctree: generated/ 

123 

124 ArpackNoConvergence 

125 ArpackError 

126 

127""" 

128 

129from ._isolve import * 

130from ._dsolve import * 

131from ._interface import * 

132from ._eigen import * 

133from ._matfuncs import * 

134from ._onenormest import * 

135from ._norm import * 

136from ._expm_multiply import * 

137from ._special_sparse_arrays import * 

138 

139# Deprecated namespaces, to be removed in v2.0.0 

140from . import isolve, dsolve, interface, eigen, matfuncs 

141 

142__all__ = [s for s in dir() if not s.startswith('_')] 

143 

144from scipy._lib._testutils import PytestTester 

145test = PytestTester(__name__) 

146del PytestTester