8000 DOC: Added docstring to chosolve · numpy/numpy@1f79b69 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1f79b69

Browse files
ovillellaspv
ovillellas
authored andcommitted
DOC: Added docstring to chosolve
1 parent 87cd05f commit 1f79b69

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

numpy/core/src/umath/gufuncs_linalg.py

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,11 @@ def inv(a, **kwargs):
285285
286286
Singular matrices and thus, not invertible, result in an array of NANs.
287287
288+
See Also
289+
--------
290+
poinv : compute the multiplicative inverse of hermitian/symmetric matrices,
291+
using cholesky decomposition.
292+
288293
Examples
289294
--------
290295
>>> a = np.array([[1, 2], [3, 4]])
@@ -1020,6 +1025,48 @@ def svd(a, full_matrices=1, compute_uv=1 ,**kw_args):
10201025

10211026

10221027
def chosolve(A, B, UPLO='L', **kw_args):
1028+
"""
1029+
Solve the linear matrix equations on the inner dimensions, using
1030+
cholesky decomposition.
1031+
1032+
Computes the "exact" solution, `x`. of the well-determined,
1033+
i.e., full rank, linear matrix equations `ax = b`, where a is
1034+
a symmetric/hermitian matrix.
1035+
1036+
Parameters
1037+
----------
1038+
A : (<NDIMS>, M, M) array
1039+
Coefficient symmetric/hermitian matrices.
1040+
B : (<NDIMS>, M, N) array
1041+
Ordinate or "dependent variable" values.
1042+
UPLO : {'L', 'U'}, optional
1043+
Specifies whether the calculation is done with the lower
1044+
triangular part of the elements in `A` ('L', default) or
1045+
the upper triangular part ('U').
1046+
1047+
Returns
1048+
-------
1049+
X : (<NDIMS>, M, N) array
1050+
Solutions to the system A X = B for all elements in <NDIMS>
1051+
1052+
Notes
1053+
-----
1054+
Numpy broadcasting rules apply.
1055+
1056+
The solutions are computed using LAPACK routines _potrf, _potrs
1057+
1058+
Implemented for single, double, csingle and cdouble. Numpy conversion
1059+
rules apply.
1060+
1061+
See Also
1062+
--------
1063+
solve : solve a system using cholesky decomposition (for equations
1064+
having symmetric/hermitian coefficient matrices)
1065+
1066+
Examples
1067+
--------
1068+
<Some example in doctest format>
1069+
"""
10231070
if len(B.shape) == (len(A.shape) - 1):
10241071
if 'L' == UPLO:
10251072
gufunc = _impl.chosolve1_lo

0 commit comments

Comments
 (0)
0