@@ -285,6 +285,11 @@ def inv(a, **kwargs):
285
285
286
286
Singular matrices and thus, not invertible, result in an array of NANs.
287
287
288
+ See Also
289
+ --------
290
+ poinv : compute the multiplicative inverse of hermitian/symmetric matrices,
291
+ using cholesky decomposition.
292
+
288
293
Examples
289
294
--------
290
295
>>> a = np.array([[1, 2], [3, 4]])
@@ -1020,6 +1025,48 @@ def svd(a, full_matrices=1, compute_uv=1 ,**kw_args):
1020
1025
1021
1026
1022
1027
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
+ """
1023
1070
if len (B .shape ) == (len (A .shape ) - 1 ):
1024
1071
if 'L' == UPLO :
1025
1072
gufunc = _impl .chosolve1_lo
0 commit comments