Skip to content

Commit 780da6e

Browse files
authored
Change v to vh in SVD (#218)
1 parent b9ae187 commit 780da6e

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

spec/extensions/linear_algebra_functions.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ Returns the eigenvalues and eigenvectors of a symmetric matrix (or a stack of sy
201201
- **out**: _Tuple\[ <array> ]_
202202

203203
- a namedtuple (`eigenvalues`, `eigenvectors`) whose
204-
204+
205205
- first element must have the field name `eigenvalues` and must be an array consisting of computed eigenvalues. The array containing the eigenvalues must have shape `(..., M)`.
206206
- second element have have the field name `eigenvectors` and must be an array where the columns of the inner most matrices contain the computed eigenvectors. The array containing the eigenvectors must have shape `(..., M, M)`.
207207

@@ -291,7 +291,7 @@ Returns the least-squares solution to a linear matrix equation `Ax = b`.
291291
- **out**: _Tuple\[ <array>, <array>, <array>, <array> ]_
292292

293293
- a namedtuple `(x, residuals, rank, s)` whose
294-
294+
295295
- first element must have the field name `x` and must be an array containing the least-squares solution for each `MxN` matrix in `x1`. The array containing the solutions must have shape `(N, K)` and must have a floating-point data type determined by {ref}`type-promotion`.
296296
- second element must have the field name `residuals` and must be an array containing the sum of squares residuals (i.e., the squared Euclidean 2-norm for each column in `b - Ax`). The array containing the residuals must have shape `(K,)` and must have a floating-point data type determined by {ref}`type-promotion`.
297297
- third element must have the field name `rank` and must be an array containing the effective rank of each `MxN` matrix. The array containing the ranks must have shape `shape(x1)[:-2]` and must have an integer data type.
@@ -300,7 +300,7 @@ Returns the least-squares solution to a linear matrix equation `Ax = b`.
300300
(function-linalg-matmul)=
301301
### linalg.matmul(x1, x2, /)
302302

303-
Alias for {ref}`function-matmul`.
303+
Alias for {ref}`function-matmul`.
304304

305305
(function-linalg-matrix_power)=
306306
### linalg.matrix_power(x, n, /)
@@ -453,7 +453,7 @@ Computes the (Moore-Penrose) pseudo-inverse of a matrix (or a stack of square ma
453453
- input array having shape `(..., M, N)` and whose innermost two dimensions form `MxN` matrices. Should have a floating-point data type.
454454

455455
- **rtol**: _Optional\[ Union\[ float, <array> ] ]_
456-
456+
457457
- relative tolerance for small singular values. Singular values less than or equal to `rtol * largest_singular_value` are set to zero. If a `float`, the value is equivalent to a zero-dimensional array having a floating-point data type determined by {ref}`type-promotion` (as applied to `x`) and must be broadcast against each matrix. If an `array`, must have a floating-point data type and must be compatible with `shape(x)[:-2]` (see {ref}`broadcasting`). If `None`, the default value is `max(M, N) * eps`, where `eps` must be the machine epsilon associated with the floating-point data type determined by {ref}`type-promotion` (as applied to `x`). Default: `None`.
458458

459459
#### Returns
@@ -514,10 +514,10 @@ The purpose of this function is to calculate the determinant more accurately whe
514514
- **out**: _Tuple\[ <array>, <array> ]_
515515

516516
- a namedtuple (`sign`, `logabsdet`) whose
517-
517+
518518
- first element must have the field name `sign` and must be an array containing a number representing the sign of the determinant for each square matrix.
519519
- second element must have the field name `logabsdet` and must be an array containing the determinant for each square matrix.
520-
520+
521521
For a real matrix, the sign of the determinant must be either `1`, `0`, or `-1`. If a determinant is zero, then the corresponding `sign` must be `0` and `logabsdet` must be `-infinity`. In all cases, the determinant must be equal to `sign * exp(logsabsdet)`.
522522

523523
Each returned array must have shape `shape(x)[:-2]` and a floating-point data type determined by {ref}`type-promotion`.
@@ -546,7 +546,7 @@ Returns the solution to the system of linear equations represented by the well-d
546546
(function-linalg-svd)=
547547
### linalg.svd(x, /, *, full_matrices=True)
548548

549-
Computes the singular value decomposition `A = USV` of a matrix (or a stack of matrices) `x`.
549+
Computes the singular value decomposition `A = USVh` of a matrix (or a stack of matrices) `x`.
550550

551551
#### Parameters
552552

@@ -556,17 +556,17 @@ Computes the singular value decomposition `A = USV` of a matrix (or a stack of m
556556

557557
- **full_matrices**: _bool_
558558

559-
- If `True`, compute full-sized `u` and `v`, such that `u` has shape `(..., M, M)` and `v` has shape `(..., N, N)`. If `False`, compute on the leading `K` singular vectors, such that `u` has shape `(..., M, K)` and `v` has shape `(..., K, N)` and where `K = min(M, N)`. Default: `True`.
559+
- If `True`, compute full-sized `u` and `vh`, such that `u` has shape `(..., M, M)` and `vh` has shape `(..., N, N)`. If `False`, compute on the leading `K` singular vectors, such that `u` has shape `(..., M, K)` and `vh` has shape `(..., K, N)` and where `K = min(M, N)`. Default: `True`.
560560

561561
#### Returns
562562

563563
- **out**: _Union\[ <array>, Tuple\[ <array>, ... ] ]_
564564

565-
- a namedtuple `(u, s, v)` whose
566-
565+
- a namedtuple `(u, s, vh)` whose
566+
567567
- first element must have the field name `u` and must be an array whose shape depends on the value of `full_matrices` and contain unitary array(s) (i.e., the left singular vectors). The left singular vectors must be stored as columns. 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`.
568568
- 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`.
569-
- third element must have the field name `v` and must be an array whose shape depends on the value of `full_matrices` and contain unitary array(s) (i.e., the right singular vectors). The right singular vectors must be stored as rows (i.e., 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`.
569+
- third element must have the field name `vh` and must be an array whose shape depends on the value of `full_matrices` and contain unitary array(s) (i.e., the right singular vectors). The right singular vectors must be stored as rows (i.e., 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`.
570570

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

0 commit comments

Comments
 (0)