Skip to content

Commit 76730f1

Browse files
authored
Add Cholesky function specification (#110)
* Add Cholesky spec * Update description * Return an array rather than a tuple * Update dtype requirements * Update dtype requirements * Move API to submodule
1 parent 4d74293 commit 76730f1

File tree

1 file changed

+21
-3
lines changed

1 file changed

+21
-3
lines changed

spec/API_specification/linear_algebra_functions.md

+21-3
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,28 @@ A conforming implementation of the array API standard must provide and support t
1515

1616
<!-- NOTE: please keep the functions in alphabetical order -->
1717

18-
(function-cholesky)=
19-
### cholesky()
18+
(function-linalg-cholesky)=
19+
### linalg.cholesky(x, /, *, upper=False)
2020

21-
TODO
21+
Returns the Cholesky decomposition of a symmetric positive-definite matrix (or a stack of symmetric positive-definite matrices) `x`.
22+
23+
<!-- NOTE: once complex numbers are supported, each square matrix must be Hermitian. -->
24+
25+
#### Parameters
26+
27+
- **x**: _&lt;array&gt;_
28+
29+
- input array having shape `(..., M, M)` and whose innermost two dimensions form square matrices. Should have a floating-point data type.
30+
31+
- **upper**: _bool_
32+
33+
- If `True`, the result must be the upper-triangular Cholesky factor. If `False`, the result must be the lower-triangular Cholesky factor. Default: `False`.
34+
35+
#### Returns
36+
37+
- **out**: _&lt;array&gt;_
38+
39+
- an array containing the Cholesky factors for each square matrix. The returned array must have a floating-point data type determined by {ref}`type-promotion` and shape as `x`.
2240

2341
(function-cross)=
2442
### cross(x1, x2, /, *, axis=-1)

0 commit comments

Comments
 (0)