Skip to content

Commit 8460552

Browse files
lezcanokgryte
andauthored
Account for when factorizations may not be well-defined (#224)
Co-authored-by: Athan <kgryte@gmail.com>
1 parent 7d3d8fe commit 8460552

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

spec/extensions/linear_algebra_functions.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Returns the specified diagonals of a matrix (or a stack of matrices) `x`.
170170
(function-linalg-eigh)=
171171
### linalg.eigh(x, /)
172172

173-
Returns the eigenvalues and eigenvectors x = QLQᵀ of a symmetric matrix (or a stack of symmetric matrices) `x`, where `Q` is an orthogonal matrix (or a stack of matrices) and `L` is a vector (or a stack of vectors).
173+
Returns an eigendecomposition x = QLQᵀ of a symmetric matrix (or a stack of symmetric matrices) `x`, where `Q` is an orthogonal matrix (or a stack of matrices) and `L` is a vector (or a stack of vectors).
174174

175175
<!-- NOTE: once complex number support, each matrix must be Hermitian and the returned Q unitary. We might also want to make the dtype of `eigenvalues` unconditionally real -->
176176

@@ -192,7 +192,6 @@ Returns the eigenvalues and eigenvectors x = QLQᵀ of a symmetric matrix (or a
192192
Each returned array must have the same floating-point data type as `x`.
193193

194194
```{note}
195-
196195
Eigenvalue sort order is left unspecified.
197196
```
198197

@@ -221,7 +220,6 @@ Returns the eigenvalues of a symmetric matrix (or a stack of symmetric matrices)
221220
- an array containing the computed eigenvalues. The returned array must have shape `(..., M)` and have the same data type as `x`.
222221

223222
```{note}
224-
225223
Eigenvalue sort order is left unspecified.
226224
```
227225

@@ -395,13 +393,13 @@ Returns the (Moore-Penrose) pseudo-inverse of a matrix (or a stack of matrices)
395393
(function-linalg-qr)=
396394
### linalg.qr(x, /, *, mode='reduced')
397395

398-
Returns the qr decomposition x = QR of a matrix (or a stack of matrices) `x`, where `Q` is an orthonormal matrix (or a stack of matrices) and `R` is an upper-triangular matrix (or a stack of matrices).
396+
Returns the qr decomposition x = QR of a full column rank matrix (or a stack of matrices), where `Q` is an orthonormal matrix (or a stack of matrices) and `R` is an upper-triangular matrix (or a stack of matrices).
399397

400398
#### Parameters
401399

402400
- **x**: _&lt;array&gt;_
403401

404-
- input array having shape `(..., M, N)` and whose innermost two dimensions form `MxN` matrices. Should have a floating-point data type.
402+
- input array having shape `(..., M, N)` and whose innermost two dimensions form `MxN` matrices of rank equal to `N`. Should have a floating-point data type.
405403

406404
- **mode**: _Literal\[ 'reduced', 'complete' ]_
407405

@@ -429,7 +427,6 @@ Returns the qr decomposition x = QR of a matrix (or a stack of matrices) `x`, wh
429427
Returns the sign and the natural logarithm of the absolute value of the determinant of a square matrix (or a stack of square matrices) `x`.
430428

431429
```{note}
432-
433430
The purpose of this function is to calculate the determinant more accurately when the determinant is either very small or very large, as calling `det` may overflow or underflow.
434431
```
435432

@@ -476,7 +473,7 @@ Returns the solution to the system of linear equations represented by the well-d
476473
(function-linalg-svd)=
477474
### linalg.svd(x, /, *, full_matrices=True)
478475

479-
Returns the singular value decomposition A = USVh of a matrix (or a stack of matrices) `x` where `U` is a matrix (or a stack of matrices) with orthonormal columns, `S` is a vector of non-negative numbers (or stack of vectors), and `Vh` is a matrix (or a stack of matrices) with orthonormal rows.
476+
Returns a singular value decomposition A = USVh of a matrix (or a stack of matrices) `x`, where `U` is a matrix (or a stack of matrices) with orthonormal columns, `S` is a vector of non-negative numbers (or stack of vectors), and `Vh` is a matrix (or a stack of matrices) with orthonormal rows.
480477

481478
#### Parameters
482479

0 commit comments

Comments
 (0)