__init__.py 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150
  1. """
  2. Sparse linear algebra (:mod:`scipy.sparse.linalg`)
  3. ==================================================
  4. .. currentmodule:: scipy.sparse.linalg
  5. Abstract linear operators
  6. -------------------------
  7. .. autosummary::
  8. :toctree: generated/
  9. LinearOperator -- abstract representation of a linear operator
  10. aslinearoperator -- convert an object to an abstract linear operator
  11. Matrix Operations
  12. -----------------
  13. .. autosummary::
  14. :toctree: generated/
  15. inv -- compute the sparse matrix inverse
  16. expm -- compute the sparse matrix exponential
  17. expm_multiply -- compute the product of a matrix exponential and a matrix
  18. funm_multiply_krylov -- use a Krylov method to compute f(A)b for a general f
  19. matrix_power -- compute the matrix power by raising a matrix to an exponent
  20. Matrix norms
  21. ------------
  22. .. autosummary::
  23. :toctree: generated/
  24. norm -- Norm of a sparse matrix
  25. onenormest -- Estimate the 1-norm of a sparse matrix
  26. Solving linear problems
  27. -----------------------
  28. Direct methods for linear equation systems:
  29. .. autosummary::
  30. :toctree: generated/
  31. spsolve -- Solve the sparse linear system Ax=b
  32. spsolve_triangular -- Solve sparse linear system Ax=b for a triangular A.
  33. is_sptriangular -- Check if sparse A is triangular.
  34. spbandwidth -- Find the bandwidth of a sparse matrix.
  35. factorized -- Pre-factorize matrix to a function solving a linear system
  36. MatrixRankWarning -- Warning on exactly singular matrices
  37. use_solver -- Select direct solver to use
  38. Iterative methods for linear equation systems:
  39. .. autosummary::
  40. :toctree: generated/
  41. bicg -- Use BIConjugate Gradient iteration to solve Ax = b
  42. bicgstab -- Use BIConjugate Gradient STABilized iteration to solve Ax = b
  43. cg -- Use Conjugate Gradient iteration to solve Ax = b
  44. cgs -- Use Conjugate Gradient Squared iteration to solve Ax = b
  45. gmres -- Use Generalized Minimal RESidual iteration to solve Ax = b
  46. lgmres -- Solve a matrix equation using the LGMRES algorithm
  47. minres -- Use MINimum RESidual iteration to solve Ax = b
  48. qmr -- Use Quasi-Minimal Residual iteration to solve Ax = b
  49. gcrotmk -- Solve a matrix equation using the GCROT(m,k) algorithm
  50. tfqmr -- Use Transpose-Free Quasi-Minimal Residual iteration to solve Ax = b
  51. Iterative methods for least-squares problems:
  52. .. autosummary::
  53. :toctree: generated/
  54. lsqr -- Find the least-squares solution to a sparse linear equation system
  55. lsmr -- Find the least-squares solution to a sparse linear equation system
  56. Matrix factorizations
  57. ---------------------
  58. Eigenvalue problems:
  59. .. autosummary::
  60. :toctree: generated/
  61. eigs -- Find k eigenvalues and eigenvectors of the square matrix A
  62. eigsh -- Find k eigenvalues and eigenvectors of a symmetric matrix
  63. lobpcg -- Solve symmetric partial eigenproblems with optional preconditioning
  64. Singular values problems:
  65. .. autosummary::
  66. :toctree: generated/
  67. svds -- Compute k singular values/vectors for a sparse matrix
  68. The `svds` function supports the following solvers:
  69. .. toctree::
  70. sparse.linalg.svds-arpack
  71. sparse.linalg.svds-lobpcg
  72. sparse.linalg.svds-propack
  73. Complete or incomplete LU factorizations
  74. .. autosummary::
  75. :toctree: generated/
  76. splu -- Compute a LU decomposition for a sparse matrix
  77. spilu -- Compute an incomplete LU decomposition for a sparse matrix
  78. SuperLU -- Object representing an LU factorization
  79. Sparse arrays with structure
  80. ----------------------------
  81. .. autosummary::
  82. :toctree: generated/
  83. LaplacianNd -- Laplacian on a uniform rectangular grid in ``N`` dimensions
  84. Exceptions
  85. ----------
  86. .. autosummary::
  87. :toctree: generated/
  88. ArpackNoConvergence
  89. ArpackError
  90. """
  91. from ._isolve import *
  92. from ._dsolve import *
  93. from ._interface import *
  94. from ._eigen import *
  95. from ._matfuncs import *
  96. from ._onenormest import *
  97. from ._norm import *
  98. from ._expm_multiply import *
  99. from ._funm_multiply_krylov import *
  100. from ._special_sparse_arrays import *
  101. # Deprecated namespaces, to be removed in v2.0.0
  102. from . import isolve, dsolve, interface, eigen, matfuncs
  103. __all__ = [s for s in dir() if not s.startswith('_')]
  104. from scipy._lib._testutils import PytestTester
  105. test = PytestTester(__name__)
  106. del PytestTester