Skip to content

Commit c08d302

Browse files
authored
Update namedtuple field names for linalg.qr and linalg.svd (#313)
1 parent 654d58d commit c08d302

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

spec/extensions/linear_algebra_functions.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ Whether an array library explicitly checks whether an input array is a symmetric
204204
Each returned array must have the same floating-point data type as `x`.
205205

206206
```{note}
207-
Eigenvalue sort order is left unspecified.
207+
Eigenvalue sort order is left unspecified and is thus implementation-dependent.
208208
```
209209

210210
(function-linalg-eigvalsh)=
@@ -235,7 +235,7 @@ Whether an array library explicitly checks whether an input array is a symmetric
235235
- an array containing the computed eigenvalues. The returned array must have shape `(..., M)` and have the same data type as `x`.
236236

237237
```{note}
238-
Eigenvalue sort order is left unspecified.
238+
Eigenvalue sort order is left unspecified and is thus implementation-dependent.
239239
```
240240

241241
(function-linalg-inv)=
@@ -428,10 +428,10 @@ Whether an array library explicitly checks whether an input array is a full colu
428428

429429
- **out**: _Tuple\[ <array>, <array> ]_
430430

431-
- a namedtuple `(q, r)` whose
431+
- a namedtuple `(Q, R)` whose
432432

433-
- first element must have the field name `q` and must be an array whose shape depends on the value of `mode` and contain matrices with orthonormal columns. If `mode` is `'complete'`, the array must have shape `(..., M, M)`. If `mode` is `'reduced'`, the array must have shape `(..., M, K)`, where `K = min(M, N)`. The first `x.ndim-2` dimensions must have the same size as those of the input array `x`.
434-
- second element must have the field name `r` and must be an array whose shape depends on the value of `mode` and contain upper-triangular matrices. If `mode` is `'complete'`, the array must have shape `(..., M, M)`. If `mode` is `'reduced'`, the array must have shape `(..., K, N)`, where `K = min(M, N)`. The first `x.ndim-2` dimensions must have the same size as those of the input `x`.
433+
- first element must have the field name `Q` and must be an array whose shape depends on the value of `mode` and contain matrices with orthonormal columns. If `mode` is `'complete'`, the array must have shape `(..., M, M)`. If `mode` is `'reduced'`, the array must have shape `(..., M, K)`, where `K = min(M, N)`. The first `x.ndim-2` dimensions must have the same size as those of the input array `x`.
434+
- second element must have the field name `R` and must be an array whose shape depends on the value of `mode` and contain upper-triangular matrices. If `mode` is `'complete'`, the array must have shape `(..., M, M)`. If `mode` is `'reduced'`, the array must have shape `(..., K, N)`, where `K = min(M, N)`. The first `x.ndim-2` dimensions must have the same size as those of the input `x`.
435435

436436
Each returned array must have a floating-point data type determined by {ref}`type-promotion`.
437437

@@ -513,11 +513,11 @@ Returns a singular value decomposition A = USVh of a matrix (or a stack of matri
513513

514514
- **out**: _Union\[ <array>, Tuple\[ <array>, ... ] ]_
515515

516-
- a namedtuple `(u, s, vh)` whose
516+
- a namedtuple `(U, S, Vh)` whose
517517

518-
- first element must have the field name `u` and must be an array whose shape depends on the value of `full_matrices` and contain matrices with orthonormal columns (i.e., the columns are left singular vectors). If `full_matrices` is `True`, the array must have shape `(..., M, M)`. If `full_matrices` is `False`, the array must have shape `(..., M, K)`, where `K = min(M, N)`. The first `x.ndim-2` dimensions must have the same shape as those of the input `x`.
519-
- second element must have the field name `s` and must be an array with shape `(..., K)` that contains the vector(s) of singular values of length `K`. For each vector, the singular values must be sorted in descending order by magnitude, such that `s[..., 0]` is the largest value, `s[..., 1]` is the second largest value, et cetera. The first `x.ndim-2` dimensions must have the same shape as those of the input `x`.
520-
- third element must have the field name `vh` and must be an array whose shape depends on the value of `full_matrices` and contain orthonormal rows (i.e., the rows are the right singular vectors and the array is the adjoint). If `full_matrices` is `True`, the array must have shape `(..., N, N)`. If `full_matrices` is `False`, the array must have shape `(..., K, N)` where `K = min(M, N)`. The first `x.ndim-2` dimensions must have the same shape as those of the input `x`.
518+
- first element must have the field name `U` and must be an array whose shape depends on the value of `full_matrices` and contain matrices with orthonormal columns (i.e., the columns are left singular vectors). If `full_matrices` is `True`, the array must have shape `(..., M, M)`. If `full_matrices` is `False`, the array must have shape `(..., M, K)`, where `K = min(M, N)`. The first `x.ndim-2` dimensions must have the same shape as those of the input `x`.
519+
- second element must have the field name `S` and must be an array with shape `(..., K)` that contains the vector(s) of singular values of length `K`. For each vector, the singular values must be sorted in descending order by magnitude, such that `s[..., 0]` is the largest value, `s[..., 1]` is the second largest value, et cetera. The first `x.ndim-2` dimensions must have the same shape as those of the input `x`.
520+
- third element must have the field name `Vh` and must be an array whose shape depends on the value of `full_matrices` and contain orthonormal rows (i.e., the rows are the right singular vectors and the array is the adjoint). If `full_matrices` is `True`, the array must have shape `(..., N, N)`. If `full_matrices` is `False`, the array must have shape `(..., K, N)` where `K = min(M, N)`. The first `x.ndim-2` dimensions must have the same shape as those of the input `x`.
521521

522522
Each returned array must have the same floating-point data type as `x`.
523523

0 commit comments

Comments
 (0)