mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-24 00:34:53 +08:00
Fix sphinx/build_docs warnings for linear_algebra (#12483)
* Fix sphinx/build_docs warnings for linear_algebra/ * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
@ -6,17 +6,18 @@ def solve_linear_system(matrix: np.ndarray) -> np.ndarray:
|
||||
Solve a linear system of equations using Gaussian elimination with partial pivoting
|
||||
|
||||
Args:
|
||||
- matrix: Coefficient matrix with the last column representing the constants.
|
||||
- `matrix`: Coefficient matrix with the last column representing the constants.
|
||||
|
||||
Returns:
|
||||
- Solution vector.
|
||||
- Solution vector.
|
||||
|
||||
Raises:
|
||||
- ValueError: If the matrix is not correct (i.e., singular).
|
||||
- ``ValueError``: If the matrix is not correct (i.e., singular).
|
||||
|
||||
https://courses.engr.illinois.edu/cs357/su2013/lect.htm Lecture 7
|
||||
|
||||
Example:
|
||||
|
||||
>>> A = np.array([[2, 1, -1], [-3, -1, 2], [-2, 1, 2]], dtype=float)
|
||||
>>> B = np.array([8, -11, -3], dtype=float)
|
||||
>>> solution = solve_linear_system(np.column_stack((A, B)))
|
||||
|
Reference in New Issue
Block a user