Skip to content

Commit a1b6290

Browse files
committed
Fix merge
2 parents c363916 + 780da6e commit a1b6290

File tree

2 files changed

+12
-19
lines changed

2 files changed

+12
-19
lines changed

.circleci/config.yml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,8 @@ jobs:
1313
<<: *defaults
1414
steps:
1515
- checkout
16-
1716
- attach_workspace:
1817
at: ~/
19-
2018
- run:
2119
name: build docs
2220
no_output_timeout: 25m

spec/extensions/linear_algebra_functions.md

Lines changed: 12 additions & 17 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\[ &lt;array&gt; ]_
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\[ &lt;array&gt;, &lt;array&gt;, &lt;array&gt;, &lt;array&gt; ]_
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, /)
@@ -323,11 +323,6 @@ Raises a square matrix (or a stack of square matrices) `x` to an integer power `
323323

324324
- if `n` is equal to zero, an array containing the identity matrix for each square matrix. If `n` is less than zero, an array containing the inverse of each square matrix raised to the absolute value of `n`, provided that each square matrix is invertible. If `n` is greater than zero, an array containing the result of raising each square matrix to the power `n`. The returned array must have the same shape as `x` and a floating-point data type determined by {ref}`type-promotion`.
325325

326-
#### Raises
327-
328-
- if the innermost two dimensions of `x` are not the same size (i.e., form square matrices).
329-
- if `n` is less than zero and a square matrix is not invertible.
330-
331326
(function-linalg-matrix_rank)=
332327
### linalg.matrix_rank(x, /, *, rtol=None)
333328

@@ -458,7 +453,7 @@ Computes the (Moore-Penrose) pseudo-inverse of a matrix (or a stack of square ma
458453
- input array having shape `(..., M, N)` and whose innermost two dimensions form `MxN` matrices. Should have a floating-point data type.
459454

460455
- **rtol**: _Optional\[ Union\[ float, &lt;array&gt; ] ]_
461-
456+
462457
- 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`.
463458

464459
#### Returns
@@ -519,10 +514,10 @@ The purpose of this function is to calculate the determinant more accurately whe
519514
- **out**: _Tuple\[ &lt;array&gt;, &lt;array&gt; ]_
520515

521516
- a namedtuple (`sign`, `logabsdet`) whose
522-
517+
523518
- 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.
524519
- second element must have the field name `logabsdet` and must be an array containing the determinant for each square matrix.
525-
520+
526521
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)`.
527522

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

554-
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`.
555550

556551
#### Parameters
557552

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

562557
- **full_matrices**: _bool_
563558

564-
- 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`.
565560

566561
#### Returns
567562

568563
- **out**: _Union\[ &lt;array&gt;, Tuple\[ &lt;array&gt;, ... ] ]_
569564

570-
- a namedtuple `(u, s, v)` whose
571-
565+
- a namedtuple `(u, s, vh)` whose
566+
572567
- 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`.
573568
- 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`.
574-
- 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`.
575570

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

@@ -648,4 +643,4 @@ Alias for {ref}`function-transpose`.
648643
(function-linalg-vecdot)=
649644
### linalg.vecdot(x1, x2, /, *, axis=None)
650645
651-
Alias for {ref}`function-vecdot`.
646+
Alias for {ref}`function-vecdot`.

0 commit comments

Comments
 (0)